AngularJS Internet Explorer 9 [英] AngularJS Internet Explorer 9
问题描述
我在使用angularjs和Internet Explorer9时遇到了小麻烦.看来,angularjs无法正确加载.如果我从我的应用程序启动ie,那么什么都行不通,但是,如果我启动ie9的开发工具并刷新页面,则我的应用程序将工作,并且所有内容都可以加载并可以使用.
I have small trouble with angularjs and internet explorer9. It look like, that angularjs is not loading correctly. If I starting ie with my application, nothing will work, but if I start the development tools of ie9 and refresh the page, my application will work and everything is loading and ready to use.
我不知道发生了什么以及如何解决此问题.我使用angularJs版本1.1.5.非常感谢!
I have no idea, what happen and how to solve this issue. I using angularJs Version 1.1.5. Big thanks!
我的问题是,我到处都有console.log(..).在FF或Chrome上,一切正常,但是使用II9时会发生一些事情,即在console.log(...)语句之后停止.从我的JavaScript中删除console.log(..)之后,我的应用程序也可以在IE7/8/9上运行.
My problem was, that I had everywhere console.log (..). On FF or Chrome, everything works, but with II9, something happens, that ie stop after the statement console.log(...); After removing console.log(..) from my JavaScript, my application also works on IE7/8/9.
但是我会问为什么IE的console.log有这么多问题?
But I would ask why IE has so much problems with console.log?
推荐答案
我遇到了同样的问题,并且在使用它之前已解决了在父控制器中创建窗口控制台的问题.您可以添加以下代码并尝试.
I run in to the same issue and what fixed it was creating window console in the parent controller before using it. You can add the following code and try.
window.console = window.console || {};
window.console.log = window.console.log || function() {};
这篇关于AngularJS Internet Explorer 9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!