-
Notifications
You must be signed in to change notification settings - Fork 27.4k
WIP: [[nomerge]] adapt to location changes happening outside of Angular #8405
Conversation
TODO: IE9 is experiencing full page reload in tests |
@jeffbcross it looks like this isn't ready to land, which is too bad --- I'm moving this (#6976) to the next milestone for now (feel free to reassign it if there's too much stuff!) |
@caitp do you have any thoughts on the approach? I'd like to address the open issues and complete this soon. |
@tbosch want to take a look? |
sorry I missed this one, lets see |
@@ -29,7 +29,8 @@ function Browser(window, document, $log, $sniffer) { | |||
history = window.history, | |||
setTimeout = window.setTimeout, | |||
clearTimeout = window.clearTimeout, | |||
pendingDeferIds = {}; | |||
pendingDeferIds = {}, | |||
urlChangedOutsideAngular = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: don't use an identical name for this symbol and the method --- that gets confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
…de of Angular $browser keeps an internal representation of the browser's url, and although $browser.url() would return the client's real current url, the $location service that was comparing that url with $location's representation had no way of knowing when the url had been changed outside of Angular. This commit makes browser and location a little bit smarter by setting a flag inside of $browser when it detects that a url changed outside of Angular, allowing $location to parse the new url and update its own internal representation of the url (and react appropriately). Fixes angular#6976
Just opening for Travis for now. Still need to determine if this is best approach to problem described in #6976.