簡體   English   中英

在IE中運行Angular 5應用程序,而無需使用“導入'core-js / es6 / reflect'和導入'core-js / es7 / reflect'”

[英]Run Angular 5 app in IE without using “import 'core-js/es6/reflect' and import 'core-js/es7/reflect'”

如何在不使用這兩個庫的情況下在IE中運行angular 5應用程序。

import 'core-js/es6/reflect' 
import 'core-js/es7/reflect' 

由於不安全評估問題,我無法使用這兩個模塊。 但是如果沒有這些,我將無法在IE上運行Angular代碼。

他們考慮了。 在Angular-CLI項目的根目錄下,有一個polyfill.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';

此外,為了獲得.includes()支持,請添加以下行:

import 'core-js/es7/array';

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM