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
This appears to be happening when you use location.back() or the browser back button to go back to the first page you loaded.
The browser page id isn't being set on the first navigation, and the logic that restores the URL on cancelled navigation with this configuration appears to depend upon it being set. If you navigate once to another page before following your reproduction steps, the 'back' works fine because you're no longer going back to the initial navigation.
Activity
garrettld commentedon Jul 11, 2023
This appears to be happening when you use location.back() or the browser back button to go back to the first page you loaded.
The browser page id isn't being set on the first navigation, and the logic that restores the URL on cancelled navigation with this configuration appears to depend upon it being set. If you navigate once to another page before following your reproduction steps, the 'back' works fine because you're no longer going back to the initial navigation.
I was able to work around this by doing an extra navigation when the app loads by calling
this.router.navigateByUrl(this.router.url)in your root component's constructor, as shown in this modified reproduction: https://stackblitz.com/edit/stackblitz-starters-kqrprm?file=src%2Fmain.ts%3AL27,src%2Flist%2Fcomponent.tsJounQin commentedon Aug 16, 2023
Any luck to resolve this issue?
fix(router): Ensure `canceledNavigationResolution: 'computed'` works …
fix(router): Ensure `canceledNavigationResolution: 'computed'` works …
angular-automatic-lock-bot commentedon Sep 21, 2023
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(router): Ensure `canceledNavigationResolution: 'computed'` works …
fix(router): Ensure `canceledNavigationResolution: 'computed'` works …