Angular 2应用程序无法在IE,MAC Safari中运行

时间:2018-10-12 06:56:02

标签: javascript angular

当我在IE,Mac Safari中打开应用程序时,登录页面未打开,并且在控制台中出现错误: SCRIPT5009:“ _”未定义 SCRIPT1006:预期为')'

2 个答案:

答案 0 :(得分:1)

在我们的项目中搜索polyfill.ts文件,并取消注释polyfills


您是否在项目中使用lodash / underscore包?如果是,那么您需要安装它

答案 1 :(得分:0)

在polyfill.ts中,您需要取消注释下面的代码。

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
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';