Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using TranslateService in component #2

Open
stormit-vn opened this issue Sep 22, 2018 · 0 comments
Open

Using TranslateService in component #2

stormit-vn opened this issue Sep 22, 2018 · 0 comments

Comments

@stormit-vn
Copy link

stormit-vn commented Sep 22, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant