【问题标题】:Not able to load angular 2 in IE无法在 IE 中加载角度 2
【发布时间】:2017-08-14 07:35:07
【问题描述】:

在 angular4 应用程序中工作,无法在 IE 中加载应用程序。我正在使用以下版本。

Node -v7.2.1
npm -v3.10.10
typescript- v2.2.1
Webpack -v2.2.1 and using ES6 module in tsconfig.json
@angular/core 4.0.0

如何在 IE 中加载 angular2 应用程序。

提前致谢

【问题讨论】:

    标签: node.js angular typescript webpack angular4


    【解决方案1】:

    尝试添加到您的 index.html(head 标签的顶部):

    <script src="https://raw.githubusercontent.com/angular/angular/66df335998d097fa8fe46dec41f1183737332021/shims_for_IE.js" type="text/plain"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.9/es5-sham.js" type="text/plain"></script>
    <meta http-equiv="X-UA-Compatible" content="IE=9;IE=edge;IE=10" />
    

    【讨论】:

    • 我已将 npm 包更新到最新版本 @angular/xxxx v4.0.0 并使用 ECMA 脚本 6.我们如何在 IE11 中加载应用程序
    猜你喜欢
    • 1970-01-01
    • 2020-04-16
    • 2015-12-18
    • 2015-04-02
    • 1970-01-01
    • 2019-11-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多