Open hkvstore opened 6 years ago
Thanks @hkvstore for your suggestion! 😄
I agree, @ngx-translate
support must be added to the component, but using the translate
pipe in the view will force everyone to install it so it may not be the better way to add support for translations.
I'm thinking in creating a custom pipe, that could use the injector to check if the TranslateService
is available, an if it is available, then use it to get the translation. What do you think @hkvstore ?
Yes, that will be even better. Thanks. I however still hope that displayText can be changed dynamically even if TranslateService
is not available.
I'd like to suggest changing displayText from string to BehaviorSubject\<string> to support dynamic change of display text and @ngx-translate, the HTML markup will become like, e.g.