There are a lot of solutions to this problem on the Internet, probably saying that the browser localStorage is used to achieve it. In my opinion, this is superfluous . It is caused by the incorrect use of routing.
The correct solution is to use Promise. The following code:
1. Add routes asynchronously
2. After successful login
This solves the above problem
{{o.name}}
{{m.name}}