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:
Andrew Scott 2021-05-24 13:54:28 -07:00 committed by Zach Arend
parent dc6bff10ac
commit 2ff5bfe139
1 changed files with 2 additions and 2 deletions

View File

@ -1947,8 +1947,8 @@ The router supports multiple guard interfaces:
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.
Then it checks the `CanActivate` guards from the top down to the deepest child route.
The router checks the `CanDeactivate` guards first, from the deepest child route to the top.
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 _any_ guard returns false, pending guards that have not completed will be canceled, and the entire navigation is canceled.