Skip to content

fix(router): properly handle redirects during traversal navigations w… - #71433

Open
atscott wants to merge 1 commit into
angular:mainfrom
atscott:traversalnavigationapi
Open

atscott wants to merge 1 commit into
angular:mainfrom
atscott:traversalnavigationapi

Conversation

@atscott

@atscott atscott commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

…ith Navigation API

When a traversal navigation is redirected by a guard or resolver, NavigationPrecommitController.redirect() cannot be used because redirect() is only valid for push and replace navigations per the WHATWG Navigation API spec (calling it on a traversal throws InvalidStateError).

To match existing History API behavior, the traversal is allowed to commit first (transitioning to the traversal entry), and then the Router initiates a replace navigation to the redirect destination.

…ith Navigation API

When a traversal navigation is redirected by a guard or resolver,
NavigationPrecommitController.redirect() cannot be used because
redirect() is only valid for push and replace navigations per the WHATWG
Navigation API spec (calling it on a traversal throws
InvalidStateError).

To match existing History API behavior, the traversal is allowed to
commit first (transitioning to the traversal entry), and then the
Router initiates a replace navigation to the redirect destination.
@atscott atscott added area: router target: patch This PR is targeted for the next patch release labels Oct 19, 2026
@ngbot ngbot Bot modified the milestone: Backlog Oct 19, 2026
@atscott
atscott requested a review from JeanMeche October 19, 2026 18:27
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: router target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants