File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,8 @@ import { Component, Input } from "@angular/core";
6
6
import { Subscription } from "rxjs/Subscription" ;
7
7
8
8
@Component ( {
9
- selector : "[translate]" ,
10
- template : "{{translation}}" ,
11
- inputs : [
12
- "params:translateParams" ,
13
- "module:translatorModule" ,
14
- ] ,
9
+ selector : "translate" ,
10
+ template : "{{ translation }}"
15
11
} )
16
12
export class TranslateComponent {
17
13
public translation : string = "" ;
@@ -35,7 +31,7 @@ export class TranslateComponent {
35
31
this . startTranslation ( ) ;
36
32
}
37
33
38
- set params ( params : any ) {
34
+ @ Input ( "translateParams" ) set params ( params : any ) {
39
35
if ( typeof params !== "object" ) {
40
36
this . logHandler . error ( "Params have to be an object" ) ;
41
37
return ;
@@ -45,7 +41,7 @@ export class TranslateComponent {
45
41
this . startTranslation ( ) ;
46
42
}
47
43
48
- set module ( module : string ) {
44
+ @ Input ( "translatorModule" ) set module ( module : string ) {
49
45
if ( this . subscription ) {
50
46
this . subscription . unsubscribe ( ) ;
51
47
}
You can’t perform that action at this time.
0 commit comments