Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add detail to Router NavigationCancel event doc #32140

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion aio/content/guide/router.md
Expand Up @@ -519,7 +519,8 @@ During each navigation, the `Router` emits navigation events through the `Router
<td>

An [event](api/router/NavigationCancel) triggered when navigation is canceled.
This is due to a [Route Guard](#guards) returning false during navigation.
This can happen when a [Route Guard](#guards) returns false during navigation,
or redirects by returning a `UrlTree`.

</td>
</tr>
Expand Down
5 changes: 4 additions & 1 deletion packages/router/src/events.ts
Expand Up @@ -122,7 +122,10 @@ export class NavigationEnd extends RouterEvent {
}

/**
* An event triggered when a navigation is canceled.
* An event triggered when a navigation is canceled, directly or indirectly.
*
* This can happen when a [route guard](guide/router#milestone-5-route-guards)
* returns `false` or initiates a redirect by returning a `UrlTree`.
*
* @publicApi
*/
Expand Down