Skip to content

Commit

Permalink
docs: add detail to router event doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jbogarthyde committed Aug 19, 2019
1 parent 5f76de1 commit 4a9518d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion aio/content/guide/router.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 4a9518d

Please sign in to comment.