example icon indicating copy to clipboard operation
example copied to clipboard

Using TranslateService in component

Open stormit-vn opened this issue 7 years ago • 0 comments

Since the function to get translated value returns an observable. So could we have some examples that show how to use TranslateService with best practices in a component? For an example, I want to show a message when executing an action successfully.

I think we can do likes this alert(await this.translate.get('newThing.message').toPromise());

Does anyone have better approaches?

stormit-vn avatar Sep 22 '18 03:09 stormit-vn