Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
router(feature): allow configuration of when URL gets updated in navigation flow #24820
In the AngularJS routers (ui-router and ng-route), the URL would be updated before navigation happened. In the Angular Router, this was changed under the assumption that application developers would want to stay on the most recently successfully navigated to route.
However, this might not always be the case. For example, when a user lands on a page they don't have permissions for, we might want the application to show the target URL with a message saying the user doesn't have permissions. This way, if the user were to copy the URL or perform a refresh at this point, they would remain on the same page.
The point of this feature is to allow the developer to choose when the URL gets updated. Error handling has not changed with this PR, meaning the URL will get reset back to the last previously successful URL. There may need to be another change allowing configuration of error handling.
If you want your PR to be merged, it has to pass all the CI checks.
If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.