Я хотел бы использовать TranslateService (Angular ngx-translate) в моем классе в статическом методе.
export class ClassName {
static CONFIG = {
selectList: [
{ name: 'name', label: TranslateService.instant('my.i18n.key') }, // i need something like this
]
}
ИЛИ как-то так:
const translate = TranslateService reference from the root(global scope)
export class ClassName {
static CONFIG = {
selectList: [
{ name: 'name', label: translate.instant('my.i18n.key') },
]
}
Как я могусделай это?Есть идеи?