docs: fix documentation of guard execution order (#42288)
The current documentation of the `CanDeactivate`, `CanActivate`, and `CanActivateChild` guard execution order is incorrect. This commit corrects the documentation. For reference, see https://stackblitz.com/edit/angular-canactivatechild-nqp1f7 Fixes #28082 PR Close #42288
This commit is contained in:
parent
dc6bff10ac
commit
2ff5bfe139
|
@ -1947,8 +1947,8 @@ The router supports multiple guard interfaces:
|
||||||
|
|
||||||
|
|
||||||
You can have multiple guards at every level of a routing hierarchy.
|
You can have multiple guards at every level of a routing hierarchy.
|
||||||
The router checks the `CanDeactivate` and `CanActivateChild` guards first, from the deepest child route to the top.
|
The router checks the `CanDeactivate` guards first, from the deepest child route to the top.
|
||||||
Then it checks the `CanActivate` guards from the top down to the deepest child route.
|
Then it checks the `CanActivate` and `CanActivateChild` guards from the top down to the deepest child route.
|
||||||
If the feature module is loaded asynchronously, the `CanLoad` guard is checked before the module is loaded.
|
If the feature module is loaded asynchronously, the `CanLoad` guard is checked before the module is loaded.
|
||||||
If _any_ guard returns false, pending guards that have not completed will be canceled, and the entire navigation is canceled.
|
If _any_ guard returns false, pending guards that have not completed will be canceled, and the entire navigation is canceled.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue