doorgets/ng-translate

Pass parameters with instant() func

kochax opened this issue · 1 comments

I`m trying to get translation which has a parameter with instant() function which has optional 'params' parameter. How should I pass the certain parameter?

JSON:
"entitySaved": "$0 was successfully saved",

TS:
this._doorGetTranslateService.instant('messages.success.entitySaved', { '$0': 'Test' })

This returns me: "undefined was successfully saved "

Found solution, param should be array, so it worked with:

this._doorGetTranslateService.instant('messages.success.entitySaved', ['test'])