I would like to use ng2-translate for placeholder. Only way to do this I found is use ng2-translate service and pass variable to placeholder like this:
class Form {
placeholder: string;
constructor(translate: TranslateService) {
translate.get('placeholder.value').subscribe(
(placeholder: string) => this.placeholder = placeholder,
);
}
}
<input type="email" placeholder={{placeholder}}/>
But it looks bulky. Is there way to use ng2-translate for placeholder with pipe or directive?