You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
we need api for allowing that during $beforeRouteChange event.
With new $location is easy, as we can revert $location and then it will never be propagated into browser.
The difficult part is, if we want to allow canceling route change which was triggered by browser (user has typed different url).
The same propblem is when using hashbang mode, then clicking any link means updating the browser's address bar first...
Definitely agree with adding something like a $beforeRouteChange or $beforeRouteChangeStart event. $locationChangeStart works (although hitting the back button only works with the fix to $location mentioned here: #2109), it seems much more intuitive for $route to handle notifying before a route changes and allowing it to be cancelled since we already have $routeChangeStart and $routeChangeSuccess.
Using latest angular $routeChangeStart event parameter has preventDefault() method which apparently does absolutely nothing. It also peculiarly has a property: defaultPrevented which is always false and if set to true also does absolutely nothing. Not sure why this was closed since it doesn't appear to be implemented or perhaps something else broke it (no regression tests?).
we need api for allowing that during $beforeRouteChange event.
With new $location is easy, as we can revert $location and then it will never be propagated into browser.
The difficult part is, if we want to allow canceling route change which was triggered by browser (user has typed different url).
The same propblem is when using hashbang mode, then clicking any link means updating the browser's address bar first...