【发布时间】:2020-08-11 05:27:12
【问题描述】:
我们的应用无法在 IE 中运行,它只显示编译错误 (SCRIPT1002),当导航到该行时,它会显示类 TranslateLoader。
我已经找到了一个类似的问题,不幸的是答案不起作用:ngx-translate with Angular 9 not working in IE showing compilation error SCRIPT1002
任何帮助都会很棒。非常感谢。
package.json
"@angular/core": "~9.1.6",
.....
"@ngx-translate/core": "^12.0.0",
"@ngx-translate/http-loader": "^5.0.0",
"classlist.js": "^1.1.20150312",
"web-animations-js": "^2.3.2",
浏览器列表
> 0.5%
last 2 versions
Firefox ESR
not dead
IE 9-11
tsconfig.json
...
"module": "es2015",
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
polyfills.ts
import 'classlist.js'; // Run `npm install --save classlist.js`.
import 'web-animations-js'; // Run `npm install --save web-animations-js`.
import 'zone.js/dist/zone'; // Included with Angular CLI.
【问题讨论】:
标签: angular internet-explorer ngx-translate