当使用“@angular/localize/”中的 $localize 和“ ng serve --configuration=de ”时,我得到了这个:
仅使用“ ng serve ”运行项目时,它可以完美运行。
在 app.component.ts
public product: TabDefinition = { name: $localize`Products`, route: "/products" };
在 Polyfills.ts 中
import "@angular/localize/init";
import { loadTranslations } from "@angular/localize";
loadTranslations({
"6707361102856436710": "Produkte",
});