Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RoutingController.replace does not test guards before removing #2046

Open
Adam-Langley opened this issue Aug 24, 2024 · 0 comments
Open

RoutingController.replace does not test guards before removing #2046

Adam-Langley opened this issue Aug 24, 2024 · 0 comments

Comments

@Adam-Langley
Copy link

Adam-Langley commented Aug 24, 2024

Fairly straightforward issue, replace removes items from the stack before checking whether it will be allowed to push the new route.
Unfortunately, it does not test any route guards owned by the new route, before removing any routes.

The result is if the route passed to 'replace', has a guard that will block the navigation, then half the navigation is completed (the removal parts), leaving you in an unexpected stated.

We are using route guards to prevent the user from accessing areas of the application given certain conditions.
When they are navigated deeply within the application, clicking on a button to navigate them somewhere they are not allowed, will jump them "halfway" - the expected behavior is that none of their navigation request is performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant