-
Notifications
You must be signed in to change notification settings - Fork 27.5k
AngularJS - 1.1.2 - ngView/location/route problem with IE 9 (I think "10 $digest() iterations reached" is just the first part of the problem)... #2007
Comments
For what it's worth, I'm having this issue as well, with no apparent resolution that I can find. |
Same issue |
I am also having this issue both in IE8 and IE9. IE10 seems to be ok. |
I encountered the same problem. You patch helped. Thanks a lot! You saved my life! :-) |
I solved this issue without editing angular code. I added following code before angular loading if (!history.pushState) {
//if hashbang url found and we are not on our base then go to base
if (window.location.hash.charAt(1) === "!" && window.location.pathname !== '/') {
window.location.replace('/#!' + window.location.hash.substring(2));
}
//if hasbang not found then convert link to hashbang mode
if(window.location.hash.charAt(1) !== "!") {
window.location.replace('/#!' + window.location.pathname + window.location.search+window.location.hash);
}
} It's not quite right, but doesn't require changing angular source and let it working until this issue will be fixed |
Just submitted pull request for that #2782. |
I am facing this issue even in IE10 |
We are also facing the same issue and fix so far? |
As part of our effort to clean out old issues, this issue is being automatically closed since it has been inactivite for over two months. Please try the newest versions of Angular ( Thanks! |
The fix described here was in fact merged long ago. |
Issue still happens even in 1.2.3 |
Still seeing this issue (IE 10 is what I've specifically tested with)... We've tried 1.2.7, 1.2.8, and 1.2.9. Since this is listed as "closed", is there another open thicket for this issue? |
Still Facing this ussue 1.2.12 |
Still facing this Issue 1.2.0-rc.3 |
So, the docs app is using Could one of you try and put together a minimal reproduction on heroku or something? (Plunkr would ordinarily be fine, but this sounds like an HTML5-mode issue), and be sure to also make the source code for the heroku server available. Also, be sure to use a recent version of Angular in the reproduction, either 1.2.16 or 1.3 (And yes, the reproduction does need to be hosted somewhere so that I can play around with it via saucelabs, because I don't have access to a local IE9) |
+1. We are seeing this issue with Angular 1.2.15 on IE8, IE9, IE10, and IE11 I've read a lot about this issue, but it doesn't appear that anyone really has a good handle on it. Can someone summarize what is happening here? I mean, I understand the that |
I should add that I found the condition that exercises this bug. My code was writing to |
@BrianGenisio great work, as this seems to sort out the issue, I still have a glitch, but I thing that is my own issue to resolve. I think the AngulatJS tutorials and documentation should tell people never to use "window.location", and even using $window dod not work for me, but the strategy should always be via $location - make sense as the AngularJS team can encapsulate the crap, as they do with so much other DOM related stuff. I love Angular, and this is the first really annoying thing as unfortunately my customers have people still using IE (yeah!). Colin |
I'm using AngularJS v1.2.25 with $location.path('/coolurl'); with $locationProvider.html5Mode(false).hashPrefix('!'); and on route change that error persists, anyone have any ideia on how to solve it? This problem happens in IE8 and IE9... |
I adjusted this example slightly to demonstrate the problem(s)...I think there may be two:
http://docs.angularjs.org/api/ng.directive:ngView
I've stored the files to replicate the problem(s) here:
http://plnkr.co/edit/Gc6ES0boirDdfHAZAATl
They do not appear to work directly from the plunker preview (as the templates don't seem to get loaded properly); however, if you zip/download/install them and then run the web-server.js, you should be able to replicate them.
With "web-server.js" running, try to load "localhost:8000/index.html" in Chrome and Firefox (and presumably any browser with HTML5 mode capabilities), it works as expected, with the navigation clicks causing the proper template to be loaded into the ngView (according to the routeProvider).
However, when I run it in IE 9 (and maybe other non-HTML5 mode browsers), I get the "10 digest() iterations reached" problem (see log/ie9.error-console.txt for the copy from the IE 9 "F12 Developer Tools" console).
After looking at the source code, I saw why the max iterations were reached...the oldUrl (which comes from location.href via the browser.url() getter) does not have the hash (or hashbang) but the location.absUrl() does have it and thus they're always considered different here:
But, inside the browser url() function (setter behavior in particular), nothing happens because it thinks the old and new values are the same, because it compares the input url with the lastBrowserUrl rather than the location.href.
So, I think that's the first problem...I don't know enough about the framework or the specific intended behavior to know what should happen, but it seems like the watch should be able to recognize that no changes happened when html5Mode is set to true for a browser like IE 9 that does not support it.
I put in a "fix" to stop this unintended iteration (etc/angular.js.patch) and this got rid of the error in the console but still did not load the index.html and this did not allow me to try the navigation links. I think this is the second problem; however, it could be because I didn't fix the first problem properly.
Finally, thanks for all of your work on this fine product (and sorry for the formatting of parts of this message).
The text was updated successfully, but these errors were encountered: