Angular 2版本(2.0.1)Internet Explorer(SystemJS)语法错误 [英] Angular 2 Release (2.0.1) Internet Explorer (SystemJS) Syntax Error

查看:108
本文介绍了Angular 2版本(2.0.1)Internet Explorer(SystemJS)语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Angular 2 Release(2.0.1)应用程序,该应用程序在Chrome中可以正常运行,但在Internet Explorer 11中引发以下错误:

I have an Angular 2 Release (2.0.1) application that works fine in Chrome but throws the following error in 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具有:

my index.html has:

<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垫片的建议和帖子,但它们是针对Angular 2的较早版本的.

I have seen a couple suggestions and posts about different IE shims, but they are for older versions of Angular 2.

有什么建议吗?

推荐答案

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

This is the order of pre-reqs I use for my Angular2 2.4.5 app
(also worked with previous version of 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版本(2.0.1)Internet Explorer(SystemJS)语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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