带有 Angular 9 的 ngx-translate 在 IE 中不工作显示编译错误 SCRIPT1002

ngx-translate with Angular 9 not working in IE showing compilation error SCRIPT1002

TranslateModule 导入我的应用程序模块后,我在 Internet Explorer SCRIPT1002 中看到一个错误,当导航到我看到的那一行时a class TranslateLoader(有问题,IE不知道class)。

我的应用程序在没有该库的情况下在 IE 中运行,因此似乎不是 polyfills 问题。

如有任何帮助,我们将不胜感激。谢谢

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

不确定这是否是正确的解决方案,但它对我有用: 我已经降级 ngx translate core 和 http-loader 版本如下:

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