gpt4 book ai didi

Angular 9 引入了需要加载的全局 '$localize()' 函数

转载 作者:行者123 更新时间:2023-12-02 09:38:58 25 4
gpt4 key购买 nike

我在新的 angular 项目设置中遇到以下错误。

Installed Packages and its versions

ERROR Error: Uncaught (in promise): Error: It looks like your application or one of its dependencies is using i18n. Angular 9 introduced a global $localize() function that needs to be loaded. Please add import '@angular/localize'; to your polyfills.ts file. Error: It looks like your application or one of its dependencies is using i18n. Angular 9 introduced a global $localize() function that needs to be loaded.



注意:我来自以下。它建议回退到旧版本。
https://github.com/angular/angular/issues/32508

最佳答案

你需要先确保你有 @angular/localize 包:
npm install @angular/localize --save
然后,import '@angular/localize/init'在您的 polyfills.ts 文件就像错误所说

关于Angular 9 引入了需要加载的全局 '$localize()' 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57953317/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com