Angular 角度CLI+;角度4=IE10不';行不通

Angular 角度CLI+;角度4=IE10不';行不通,angular,angular-cli,Angular,Angular Cli,我无法让IE10加载全新的Angular CLI项目。除了运行“ng new”时默认Angular CLI包附带的代码之外,没有其他代码 我使用的是Angular 4.2.4、@Angular/cli 1.3.1和IE 10.0.9200.16519 我尝试了“ng build”和“ng build--prod”,它们都返回相同的错误消息。项目在其他浏览器上运行 我已经取消了项目polyfills.ts中运行IE9、IE10、IE11所需的所有polyfill行的注释(并按照文件中的说明安装了所

我无法让IE10加载全新的Angular CLI项目。除了运行“ng new”时默认Angular CLI包附带的代码之外,没有其他代码

我使用的是Angular 4.2.4、@Angular/cli 1.3.1和IE 10.0.9200.16519

我尝试了“ng build”和“ng build--prod”,它们都返回相同的错误消息。项目在其他浏览器上运行

我已经取消了项目polyfills.ts中运行IE9、IE10、IE11所需的所有polyfill行的注释(并按照文件中的说明安装了所有内容)

这4个错误是:

预期标识符polyfills.bundle.js,第6127行,字符67

var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7;
对象不支持属性或方法“bind”style.bundle.js,第279行字符3

update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
预期标识符vendor.bundle.js,第2056行字符71

exports.rxSubscriber = (typeof Symbol === 'function' && typeof Symbol.for === 'function') ?
Symbol.for('rxSubscriber') : '@@rxSubscriber';
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
对象不支持属性或方法“defineProperty”main.bundle.js,第132行字符1

exports.rxSubscriber = (typeof Symbol === 'function' && typeof Symbol.for === 'function') ?
Symbol.for('rxSubscriber') : '@@rxSubscriber';
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
似乎“符号”、“绑定”和“定义属性”是罪魁祸首

我确实看到pollyfills.ts项目文件中包含符号和对象es6多边形填充,但:

****************************************
* BROWSER POLYFILLS
*/
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
...
(+ all the other polyfills that are in the polyfills.ts file)

如何在IE10上实现这一点?

默认情况下,angular cli项目不支持polyfills,这是angular应用程序在IE9、IE10和IE11上运行所需的。我们需要取消注释
src/polyfills.ts
下所有必需的polyfills,以便在IE上运行应用程序。(确保您已经安装了所有指示的节点包,如
classlist.js
web animations js
intl
使用`npm install--save命令。)

添加:

<meta http-equiv="x-ua-compatible" content="IE=edge">

到index.html的
部分


将IE9、IE10、IE11兼容模式设置为EDGE解决了所有问题

我的不好,但是对于你的第二个评论,在阅读你的第一个评论之前,我已经对我的答案进行了编辑。