我正在尝试使用 IE 9 启动 angular 应用程序(ng new "appname"),但它仅在我打开 IE9 开发工具窗口重新加载页面时才有效
我在 polyfills.ts 添加(取消注释)所有必要的 polyfill
这是视频
角 4.2.4
更新谢谢你,马丁
最后让它与 console-polyfill 和 zonejs 一起工作
<script type="text/javascript" src="inline.bundle.js"></script>
<script type="text/javascript" src="polyfills.bundle.js"></script>
<script type="text/javascript" src="zone.js"></script>
<script type="text/javascript" src="main.bundle.js"></script>
看起来您正在console
代码中使用(问题出在main.bundle.js
)。如果您想同时使用它并支持 IE9,则需要为其添加另一个 polyfill。
你可能会使用这个:
https://github.com/paulmillr/console-polyfill
我尝试创建新应用程序并构建它,有一种用法console
并且它在src/main.ts
文件中,您还可以检查是否console
支持并仅在这种情况下使用它:
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => 'console' in window ? console.log(err) : null);
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句