IE11 issue Angular CLI project in Angular2(TS), polyfills are notworking

南笙酒味 提交于 2019-12-05 18:29:05

You are probably targeting es6, which compiles the arrow functions to arrow functions:

let fn = () => console.log("hey");

Compiles to:

let fn = () => console.log("hey");

But if you target es5 it compiles to:

var fn = function () { return console.log("hey"); };

It seems that IE11 (or any other version of explorer) do not yet support arrow functions.
If you want to support it you'll have to target es5 or below, as there is no pollyfil for arrow functions.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!