Analysis process of route navigation

The complete navigation analysis process:

1. Navigation is triggered.
2. Call the beforeRouteLeave guard in the deactivated component.
3. Call the global beforeEach guard.
4. Call the beforeRouteUpdate guard (2.2+) in the reused component.
5. Call beforeEnter in the routing configuration.
6. Resolve asynchronous routing components.
7. Call beforeRouteEnter in the activated component.
8. Call the global beforeResolve guard (2.5+).
9. Navigation is confirmed.
10. Call the global afterEach hook.
11. Trigger DOM update.
12. Use the created instance to call the callback function passed to next in the beforeRouteEnter guard.

Guess you like

Origin blog.csdn.net/qq_43237014/article/details/112222146