使用Angular 5的IE 11兼容性错误

编程入门 行业动态 更新时间:2024-10-26 15:26:59
本文介绍了使用Angular 5的IE 11兼容性错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

I have build my Angular application then run it in server.

我遇到了本地主机未显示的错误.

I got errors that where not shown in localhost.

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

文件 Chart.min.js,ligne:10,colone:115187

Error SCRIPT 1028 Expected identifier, string or number

文件 polyfills.bundle.js,ligne:6399,Colonne:5 .

Object doesn't support property or method 'querySelector

文件 styles.bundle.js,ligne:215,colone:2

Expected identifier

文件: vendor.bundle.js,ligne:3169,Colonne:23

我在polyfills.ts中没有注释注释

I have uncommente imports in 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.

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

Here's network trafic when loading app

推荐答案

在index.html中添加元标记.这也是必要的一行.

Add meta tag in the index.html. This is also a necessary line.

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

更多推荐

使用Angular 5的IE 11兼容性错误

本文发布于:2023-11-23 03:53:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1619995.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:兼容性   错误   Angular

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!