-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Fixed inconsistency in $location.path() behaviour on the $locationChangeStart event when using back/forward buttons in the browser or manually changing the url in the address bar. #5089
Conversation
Thanks for the PR!
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
This is my first pull request. I see the commit message does not exactly follow the rules, so I'll fix it in a moment. |
Commit message fixed. How do I sign the CLA? |
There is a link in CONTRIBUTING.md (https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#signing-the-cla) Caitlin Potter On Nov 22, 2013, at 9:00 AM, Sebastian [email protected] wrote:
|
I have signed the CLA. My name is Sebastian Koszuta |
@skoszuta please add some test code to this. |
Sure. I'll push some tomorrow. |
I think locationChangeStart should be executed before everything when you're changing the URL. Am I wrong? |
Alright. I pushed a test for this. Now, whether the $location should contain the old or new url during $locationChangeStart is something we can discuss. But it's a sure thing that it should be consistent. It would be great if one could access the old and the new url in their parsed forms when $locationChangeStart occurs. "Parsed" as in similar to a raw route, like: /bla. As for now only full URLs are passed to the event listener. |
…is triggered by the browser Fixed inconsistency in $location.path() behaviour on the $locationChangeStart event when using back/forward buttons in the browser or manually changing the url in the address bar. $location.path() now returns the target url in these cases. Closes angular#4989
thanks. I improved the test and merged this in. |
…is triggered by the browser Fixed inconsistency in $location.path() behaviour on the $locationChangeStart event when using back/forward buttons in the browser or manually changing the url in the address bar. $location.path() now returns the target url in these cases. Closes angular#4989 Closes angular#5089 Closes angular#5118 Closes angular#5580
…is triggered by the browser Fixed inconsistency in $location.path() behaviour on the $locationChangeStart event when using back/forward buttons in the browser or manually changing the url in the address bar. $location.path() now returns the target url in these cases. Closes angular#4989 Closes angular#5089 Closes angular#5118 Closes angular#5580
This is related to #4989