angular项目兼容IE浏览器
发布时间:2020-12-17 08:13:11 所属栏目:安全 来源:网络整理
导读:前言 图书馆的项目最近想要放到钉钉上使用,但是项目放到微信公众号上可以访问,放到钉钉上却不可以用,刚开始很疑惑为什么会这样呢,后来才知道钉钉的内核是IE内核,把项目放到电脑上的IE浏览器中也是不可以访问的。知道了为什么,接下来就好办了,那就是解
前言图书馆的项目最近想要放到钉钉上使用,但是项目放到微信公众号上可以访问,放到钉钉上却不可以用,刚开始很疑惑为什么会这样呢,后来才知道钉钉的内核是IE内核,把项目放到电脑上的IE浏览器中也是不可以访问的。知道了为什么,接下来就好办了,那就是解决呗。 叙述其实angular项目如何兼容IE浏览器,项目中已经告诉我们了,打开angular自动生成的polyfill.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/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 'babel-polyfill';
import 'classlist.js';
import 'web-animations-js';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/** IE10 and IE11 requires the following to support `@angular/animation`. */
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';
/** ALL Firefox browsers require the following to support `@angular/animation`. **/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/*************************************************************************************************** * Zone JS is required by Angular itself. */
import 'zone.js/dist/zone'; // Included with Angular CLI.
/*************************************************************************************************** * APPLICATION IMPORTS */
/** * Date,currency,decimal and percent pipes. * Needed for: All but Chrome,Firefox,Edge,IE11 and Safari 10 */
// import 'intl'; // Run `npm install --save intl`.
对于文件中import在干什么,你仔细看每一行代码后面的注释就知道了。解释的非常的详细。 小结很简单的解决方法,一定要去尝试哦。 感谢您的阅读~~ (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |