From e3f42818e9d742689d948e8699f691edd227f377 Mon Sep 17 00:00:00 2001 From: Judy Bogart Date: Wed, 14 Aug 2019 11:04:26 -0700 Subject: [PATCH] docs: add detail to router event doc (#32140) PR Close #32140 --- aio/content/guide/router.md | 3 ++- packages/router/src/events.ts | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/aio/content/guide/router.md b/aio/content/guide/router.md index 384c96a0ff..6986662897 100644 --- a/aio/content/guide/router.md +++ b/aio/content/guide/router.md @@ -519,7 +519,8 @@ During each navigation, the `Router` emits navigation events through the `Router 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`. diff --git a/packages/router/src/events.ts b/packages/router/src/events.ts index edd4d12953..61200542ae 100644 --- a/packages/router/src/events.ts +++ b/packages/router/src/events.ts @@ -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 */