a5ffca0576bc67df8e4076741963a6e61eeefb2a
This PR changes the logic for determining when to skip route processing from using the URL of the last attempted navigation to the actual resulting URL after that transition. Because guards may prevent navigation and reset the browser URL, the raw URL of the previous transition may not match the actual URL of the browser at the end of the navigation process. For that reason, we need to use `urlAfterRedirects` instead. Other notes: These checks in scheduleNavigation were added in https://github.com/angular/angular/commit/eb2ceff4ba19a09a5f400f81e371ec176878cd37 The test still passes and, more surprisingly, passes if the checks are removed completely. There have likely been changes to the navigation handling that handle the test in a different way. That said, it still appears to be important to keep the checks there in some capacity because it does affect how many navigation events occur. This addresses an issue that came up in #16710: https://github.com/angular/angular/issues/16710#issuecomment-634869739 This also partially addresses #13586 in fixing history for imperative navigations that are cancelled by guards. PR Close #37716
Angular
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages.
Quickstart
Changelog
Learn about the latest improvements.
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.