【发布时间】:2018-01-09 19:37:50
【问题描述】:
我使用 MVC、VS 2015 创建了一个 Angular 4 应用程序。
当我在 chrome 上浏览应用程序时它工作正常,但在 IE 11 上它抛出以下异常:-
XHR error: (404 Not Found) loading http://localhost/src/main.js
Instantiating http://localhost/src/main.js
Loading src/main.js
我的 tsconfing.json 是:-
{
"compileOnSave": true,
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"noStrictGenericChecks": true,
"skipLibCheck": true
},
"exclude": [
"node_modules/*"
]
}
文件夹结构
src
->app folder
main.ts
system.config.js
tsconfig.js
如果您遇到类似问题,请告诉我。
【问题讨论】:
-
你能把你的 pollyfill.ts 代码粘贴到这里吗?
-
@SandipJaiswal,我没有 pollyfill.ts 文件。
-
可以在IE11中手动浏览
http://localhost/src/main.js吗? -
2018年还支持IE有意义吗?
-
@Fenton,是的,我可以打开。
标签: angular typescript internet-explorer-11