gpt4 book ai didi

Angular 2 Release (2.0.1) Internet Explorer (SystemJS) 语法错误

转载 作者:太空狗 更新时间:2023-10-29 19:34:56 24 4
gpt4 key购买 nike

我有一个 Angular 2 Release (2.0.1) 应用程序,它在 Chrome 中运行良好,但在 Internet Explorer 11 中抛出以下错误:

Error: (SystemJS) Syntax error
SyntaxError: Syntax error
at Anonymous function (eval code:11:1)
at Anonymous function (eval code:1:31)
at eval code (eval code:1:2)
Evaluating http://localhost:56159/areas/dashboard/modules/app.module.js
Evaluating http://localhost:56159/areas/dashboard/dashboard.js
Error loading http://localhost:56159/areas/dashboard/dashboard.js
{
[functions]: ,
__proto__: { },
description: "(SystemJS) Syntax error
SyntaxError: Syntax error
at Anonymous function (eval code:11:1)
at Anonymous function (eval code:1:31)
at eval code (eval code:1:2)
Evaluating http://localhost:56159/areas/dashboard/modules/app.module.js
Evaluating http://localhost:56159/areas/dashboard/dashboard.js
Error loading http://localhost:56159/areas/dashboard/dashboard.js",
message: "(SystemJS) Syntax error
SyntaxError: Syntax error
at Anonymous function (eval code:11:1)
at Anonymous function (eval code:1:31)
at eval code (eval code:1:2)
Evaluating http://localhost:56159/areas/dashboard/modules/app.module.js
Evaluating http://localhost:56159/areas/dashboard/dashboard.js
Error loading http://localhost:56159/areas/dashboard/dashboard.js",
name: "Error",
originalErr: { },
stack: "(SystemJS) Syntax error
SyntaxError: Syntax error
at Anonymous function (eval code:11:1)
at Anonymous function (eval code:1:31)
at eval code (eval code:1:2)
Evaluating http://localhost:56159/areas/dashboard/modules/app.module.js
Evaluating http://localhost:56159/areas/dashboard/dashboard.js
Error loading http://localhost:56159/areas/dashboard/dashboard.js"
}

我的 index.html 有:

<script src="./node_modules/core-js/client/shim.min.js"></script>
<script src="./node_modules/zone.js/dist/zone.js"></script>
<script src="./node_modules/reflect-metadata/Reflect.js"></script>
<script src="./node_modules/systemjs/dist/system.src.js"></script>

我看过一些关于不同 IE shim 的建议和帖子,但它们适用于旧版本的 Angular 2。

有什么建议吗?

最佳答案

这是我用于 Angular2 2.4.5 应用程序的先决条件顺序
(也适用于以前版本的 Angular2):

node_modules/core-js/client/core.min.js (version 2.4.1)      
node_modules/reflect-metadata/Reflect.js (version 0.1.9)
node_modules/systemjs/dist/system.src.js (version 0.19.42)
node_modules/zone.js/dist/zone.js (version 0.7.6)

关于Angular 2 Release (2.0.1) Internet Explorer (SystemJS) 语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41578928/

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