代码之家  ›  专栏  ›  技术社区  ›  infodev

IE 11使用角度5的兼容性错误

  •  4
  • infodev  · 技术社区  · 6 年前

    我已经构建了Angular应用程序,然后在服务器上运行它。

    我得到的错误没有显示在localhost中。

    Unable to get property 'onHover' of undefined or null reference.

    文件 图表min.js,直线:10,科隆:115187

    Error “SCRIPT 1028 Expected identifier, string or number”

    文件 多边形填充。捆js,直线:6399,科隆:5

    Object doesn't support property or method 'querySelector

    文件 样式。捆js,直线:215,科隆:2

    Expected identifier

    文件: 小贩捆js,直线:3169,科隆:23

    我在polyfills中有未注释的导入。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';
    
    //import 'classlist.js';  // Run `npm install --save classlist.js`.
    import 'core-js/es7/reflect';
    
    // import 'web-animations-js';  // Run `npm install --save web-animations-js`.
    import 'zone.js/dist/zone';  // Included with Angular CLI.
    

    加载应用程序时的网络流量

    enter image description here

    1 回复  |  直到 6 年前
        1
  •  4
  •   Basavaraj Bhusani    6 年前

    在索引中添加元标记。html。这也是一条必要的线路。

    <meta http-equiv="X-UA-Compatible" content="IE=edge" />