Angx 9中的ngx-translate在IE中不起作用,显示编译错误SCRIPT1002 [英] ngx-translate with Angular 9 not working in IE showing compilation error SCRIPT1002

查看:118
本文介绍了Angx 9中的ngx-translate在IE中不起作用,显示编译错误SCRIPT1002的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TranslateModule 导入我的应用模块后,我在Internet Explorer SCRIPT1002 中看到一个错误,当导航到该行时,我看到了一个类TranslateLoader (有问题,IE对类一无所知.)

After importing TranslateModule into my app module I am seeing an error in Internet Explorer SCRIPT1002 and when navigate to that line I am seeing a class TranslateLoader(there is the problem, IE doesn't know about class).

我的应用程序在没有该库的IE中运行,因此那里似乎不是polyfills问题.

My app is working in IE without that library so doesn't seem to be a polyfills issue there.

任何帮助将不胜感激.谢谢.

Any help would be appreciated. Thanks.

使用IE11. 在开发模式和生产模式下都会发生.

Using IE11. Happens in both dev mode and prod mode.

推荐答案

不确定这是否是正确的解决方案,但对我有用: 我已将ngx转换核心和http-loader版本降级,如下所示:

Not sure if this is the proper solution but it worked for me: I have downgraded ngx translate core and http-loader versions as follows:

"@ngx-translate/core": "^12.0.0",
"@ngx-translate/http-loader": "^5.0.0"

这篇关于Angx 9中的ngx-translate在IE中不起作用,显示编译错误SCRIPT1002的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆