Skip to content

Using TranslateService in component #2

Open
@stormit-vn

Description

@stormit-vn

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions