繁体   English   中英

在IE11上运行Angular2应用程序时vendor.bundle.js中出现错误

[英]Error in vendor.bundle.js When Running Angular2 Application on IE11

我有一个angular2应用程序,可以在chrome上完美运行。

但是,当我使用IE11打开此应用程序时,什么也看不到。

在控制台中,有一个错误:

控制台屏幕截图

似乎在vendor.bundle.js中出错。
在此文件的指向行中,使用非常长的代码调用“ eval”函数。
我猜有IE11不支持的命令。

我想做的是:将代码复制到eval函数中,用此代码替换调用eval,然后我将获得出现错误的确切行。

但是vendor.bundle.js甚至都没有出现在我的应用中...

那是什么文件
我该如何更改? 也许对此问题还有另一种解决方案?

角度信息:

角CLI:1.6.4
节点:8.9.4
操作系统:win32 x64
角度:5.2.0

----- ----- ADDING

我的polyfills.ts文件:

// This file includes polyfills needed by Angular and is loaded before the app.
// You can add your own extra polyfills to this file.
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/set';
import 'core-js/es6/reflect';

import 'core-js/es7/reflect';
import 'zone.js/dist/zone';

// If you need to support the browsers/features below, uncomment the import
// and run `npm install import-name-here';
// Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html

// Needed for: IE9
// import 'classlist.js';

// Animations
// Needed for: All but Chrome and Firefox, Not supported in IE9
 import 'web-animations-js';

// Date, currency, decimal and percent pipes
// Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
 import 'intl';

// NgClass on SVG elements
// Needed for: IE10, IE11
 import 'classlist.js';

polyfills.ts

您将/** IE9, IE10 and IE11 requires all of the following polyfills. **/ nd /** IE9, IE10 and IE11 requires all of the following polyfills. **/填充/** IE9, IE10 and IE11 requires all of the following polyfills. **/ /** IE9, IE10 and IE11 requires all of the following polyfills. **/

取消注释imports为:

import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM