Skip to content

Commit 596757b

Browse files
Update TranslateComponent.ts
To fix (angular's default) tslint errors
1 parent 7ac673c commit 596757b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/TranslateComponent.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@ import { Component, Input } from "@angular/core";
66
import { Subscription } from "rxjs/Subscription";
77

88
@Component({
9-
selector: "[translate]",
10-
template: "{{translation}}",
11-
inputs: [
12-
"params:translateParams",
13-
"module:translatorModule",
14-
],
9+
selector: "translate",
10+
template: "{{ translation }}"
1511
})
1612
export class TranslateComponent {
1713
public translation: string = "";
@@ -35,7 +31,7 @@ export class TranslateComponent {
3531
this.startTranslation();
3632
}
3733

38-
set params(params: any) {
34+
@Input("translateParams") set params(params: any) {
3935
if (typeof params !== "object") {
4036
this.logHandler.error("Params have to be an object");
4137
return;
@@ -45,7 +41,7 @@ export class TranslateComponent {
4541
this.startTranslation();
4642
}
4743

48-
set module(module: string) {
44+
@Input("translatorModule") set module(module: string) {
4945
if (this.subscription) {
5046
this.subscription.unsubscribe();
5147
}

0 commit comments

Comments
 (0)