有错误的空白页 - TypeError:Object.assign未定义(Angular)

时间:2017-06-06 10:26:05

标签: angular

我创建了一个myang项目,我在Ubuntu 14.04 LTS上使用了nodejs V8.0.0和npm Version 5.0.3。

我已使用命令npm install -g @angular/cli安装了Angular。

当我使用ng serve时,应用程序的工作属性已经在http://localhost:4200的浏览器上进行了检查。

每件事都已正确安装,但我收到以下错误:

  

类型错误:Object.assign未定义

我附上了截屏。请检查并帮我在浏览器上显示问候语。

我在控制台上输入错误

type error

当我使用ng serve网络包时,所有内容都已成功安装 -

image

显示空白页面的输出 blank page

1 个答案:

答案 0 :(得分:3)

我很高兴能解决问题。

在src中打开此文件polyfills.ts,您会发现IE11的这些polyfills被注释掉了:

    /** 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/set';