IE11 Angular 2 error “Expected identifier, string or number”

时光毁灭记忆、已成空白 提交于 2019-11-30 08:06:42

The main problem is IE has Compatibility Mode enabled by default. And IE 11 has some compatibility mode issues. As per the followings question answer Angular 2 / 4 not working in IE11

When I tried to disable the compatibility mode off It works fine.

But ingeneral user will not off the compatibility mode. So I want a good solution for that.

Then I found following solution form Force IE compatibility mode off using tags

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

I googled it and found that it was maybe reserved words in my identifiers key:value pairs.

No. These are not relevant to IE11.

Fix

You are most likely running raw .ts files. You should be hosting (in your script tags) the bundled / built .js files.

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