角度翻译Ngnx

时间:2020-03-13 09:47:49

标签: angular nginx

我在新的Angular应用中启用了翻译功能(ngnx / translate),一切正常。除了现在,我想在导航栏中启用翻译,而我无法使其正常工作。

nav.component.html

<mat-toolbar class="toolbarNav">
<a *ngFor="let link of LINKS" class="text-center" routerLink="/{{ link.route }}"><i class="fa fa-{{ link.icon }}"></i><p class="small mb-0">{{ link.label | translate }}</p></a>
</mat-toolbar>

nav.component.ts

export class NavbarComponent {
LINKS = [
{"label":"Home","icon":"home","route":"dashboard"},
{"label":"Diary","icon":"book","route":"dashboard"},
{"label":"Lines","icon":"plus","route":"lines"},
{"label":"Search","icon":"search","route":"dashboard"},
{"label":"Settings","icon":"user","route":"dashboard"}
  ];
}

翻译管道不起作用,它仍然只显示EN文本。有人吗?

0 个答案:

没有答案
相关问题