我今天试图在仅包含export const TEST = {}角的文件中使用翻译
export const TEST = {}
任何使用翻译的想法,因为我没有构造函数,所以没有办法打电话给translation : TranslationService
translation : TranslationService
谢谢
export const OPTIONS = { value : 'TRANSLATIONKEY' }
您需要配置翻译模块。参见https://www.npmjs.com/package/@ngx-translate/core。