Angular 4.0.0 App built by angular-cli 1.0.0 not working in IE11

前端 未结 2 1996
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-29 23:49

I try to run my virgin Angular 4 Application built by the angular-cli 1.0.0 in the Internet Explorer 11, but I have no success and I get the following error:



        
2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-30 00:14

    Angular-CLI includes a file in the src/ directory called pollyfills.ts.

     * BROWSER POLYFILLS
     */
    
    /** IE9, IE10 and IE11 requires all of the following polyfills. **/
    import 'core-js/es6/symbol';
    import 'core-js/es6/object';
    import 'core-js/es7/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/es7/array';
    

    Uncomment all of the IE polyfills in that file and things should work swimmingly.

提交回复
热议问题