-
Notifications
You must be signed in to change notification settings - Fork 27.5k
If you use html5mode on IE9, IE8 it fails with 10 $digest() iterations r... #2802
If you use html5mode on IE9, IE8 it fails with 10 $digest() iterations r... #2802
Conversation
…s reached. There was an issue with location.replace method isn't changing the location.href immediately.
PR Checklist (Minor Bugfix)
|
This will need CLA signing, better commit message and unit tests |
+1 for this feature :) |
I just wanted to start writing unit tests for this PR but I am not even able to reproduce it anymore. Better to say I could reproduce it but i think it was just because the setting of base href attribute or links were wrong. That is a reason I am closing this PR. It seems that what fix the issue for me is just try to get my settings working in different browsers in the same way. What worked for me If I use base href attribute to and with "/" (e.g. |
actually, I think that the fix is valid. we just tested it and finally understood what was happening in IE. I'm going to go and merge this in without a test because testing this stuff isn't possible with a mock and we don't have another way to test this right now. |
If an app uses HTML5 mode and we open an html5 url on IE8 or 9 which don't support location href, we use location.replace to reload the page with the hashbang equivalent of the url but this fails with infinite digest. This is because location.replace doesn't update location.href synchronously on IE8 and 9. Closes angular#2802, angular#3305, angular#1417
If an app uses HTML5 mode and we open an html5 url on IE8 or 9 which don't support location href, we use location.replace to reload the page with the hashbang equivalent of the url but this fails with infinite digest. This is because location.replace doesn't update location.href synchronously on IE8 and 9. Closes #2802, #3305, #1417
If an app uses HTML5 mode and we open an html5 url on IE8 or 9 which don't support location href, we use location.replace to reload the page with the hashbang equivalent of the url but this fails with infinite digest. This is because location.replace doesn't update location.href synchronously on IE8 and 9. Closes #2802, #3305, #1417
Thanks so much for this PR @pvasek! |
This issue seems to manifest itself in IE 7 as well. The delays seen with location.replace also seem to happen with setting location.href directly and therefore an infinite loop can occur in IE 7. |
Refactored `replacedUrl` to store the new URL on both `location.replace` and setting `location.href` directly to handle delays in the actual location value change in IE. Closes angular#2802
Refactored `replacedUrl` to store the new URL on both `location.replace` and setting `location.href` directly to handle delays in the actual location value change in IE. Closes #2802
Refactored `replacedUrl` to store the new URL on both `location.replace` and setting `location.href` directly to handle delays in the actual location value change in IE. Closes angular#2802
Refactored `replacedUrl` to store the new URL on both `location.replace` and setting `location.href` directly to handle delays in the actual location value change in IE. Closes angular#2802
There was an issue with location.replace method isn't changing the location.href immediately.
This pull-request is the same like this one #2782 but for 1.0.x branch.