Replies: 1 comment 1 reply
-
can you please post a minimal complete example by forking one of the existing examples on stackblitz ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying permission verification in beforeLoad, as it is a simple experiment, please do not worry about the name of my component.
I am attempting permission verification in the beforeLoad component of the root component, if it is not on the count page. Just check if there is a value for admin in localStorage, and if not, redirect to the count page. This is just a simulation of the login effect. Most of the results of the experiment met expectations, but I added a link button in the root component, which is roughly like this: root ->{link: {to: about}, outlet: {count}}.
At this moment, a magical thing happened. When I failed my first verification and redirected to the count page, when I clicked on the link again, it avoided the expected verification. My expectation is that whether I enter the URL in the search box or click on the link, it will go to the count page. There is no problem with the URL now, but when you click the button, it will go to count once, about again, and cross jump


Beta Was this translation helpful? Give feedback.
All reactions