@@ -24,7 +24,7 @@ export type NavigationTrigger = 'imperative'|'popstate'|'hashchange';
2424 * Base for events the router goes through, as opposed to events tied to a specific
2525 * route. Fired one time for any given navigation.
2626 *
27- * @usageNotes
27+ * The following code shows how a class subscribes to router events.
2828 *
2929 * ```ts
3030 * class MyService {
@@ -39,6 +39,7 @@ export type NavigationTrigger = 'imperative'|'popstate'|'hashchange';
3939 * ```
4040 *
4141 * @see `Event`
42+ * @see [Router events summary](guide/router#router-events)
4243 * @publicApi
4344 */
4445export class RouterEvent {
@@ -59,6 +60,9 @@ export class NavigationStart extends RouterEvent {
5960 * Identifies the call or event that triggered the navigation.
6061 * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.
6162 *
63+ * @see `NavigationEnd`
64+ * @see `NavigationCancel`
65+ * @see `NavigationError`
6266 */
6367 navigationTrigger ?: 'imperative' | 'popstate' | 'hashchange' ;
6468
@@ -104,6 +108,10 @@ export class NavigationStart extends RouterEvent {
104108/**
105109 * An event triggered when a navigation ends successfully.
106110 *
111+ * @see `NavigationStart`
112+ * @see `NavigationCancel`
113+ * @see `NavigationError`
114+ *
107115 * @publicApi
108116 */
109117export class NavigationEnd extends RouterEvent {
@@ -126,10 +134,13 @@ export class NavigationEnd extends RouterEvent {
126134
127135/**
128136 * An event triggered when a navigation is canceled, directly or indirectly.
129- *
130- * This can happen when a [route guard](guide/router-tutorial-toh#milestone-5-route-guards)
137+ * This can happen when a route guard
131138 * returns `false` or initiates a redirect by returning a `UrlTree`.
132139 *
140+ * @see `NavigationStart`
141+ * @see `NavigationEnd`
142+ * @see `NavigationError`
143+ *
133144 * @publicApi
134145 */
135146export class NavigationCancel extends RouterEvent {
@@ -152,6 +163,10 @@ export class NavigationCancel extends RouterEvent {
152163/**
153164 * An event triggered when a navigation fails due to an unexpected error.
154165 *
166+ * @see `NavigationStart`
167+ * @see `NavigationEnd`
168+ * @see `NavigationCancel`
169+ *
155170 * @publicApi
156171 */
157172export class NavigationError extends RouterEvent {
@@ -172,7 +187,7 @@ export class NavigationError extends RouterEvent {
172187}
173188
174189/**
175- *An event triggered when routes are recognized.
190+ * An event triggered when routes are recognized.
176191 *
177192 * @publicApi
178193 */
@@ -199,6 +214,8 @@ export class RoutesRecognized extends RouterEvent {
199214/**
200215 * An event triggered at the start of the Guard phase of routing.
201216 *
217+ * @see `GuardsCheckEnd`
218+ *
202219 * @publicApi
203220 */
204221export class GuardsCheckStart extends RouterEvent {
@@ -223,6 +240,8 @@ export class GuardsCheckStart extends RouterEvent {
223240/**
224241 * An event triggered at the end of the Guard phase of routing.
225242 *
243+ * @see `GuardsCheckStart`
244+ *
226245 * @publicApi
227246 */
228247export class GuardsCheckEnd extends RouterEvent {
@@ -252,6 +271,8 @@ export class GuardsCheckEnd extends RouterEvent {
252271 * Runs in the "resolve" phase whether or not there is anything to resolve.
253272 * In future, may change to only run when there are things to be resolved.
254273 *
274+ * @see `ResolveEnd`
275+ *
255276 * @publicApi
256277 */
257278export class ResolveStart extends RouterEvent {
@@ -301,6 +322,8 @@ export class ResolveEnd extends RouterEvent {
301322/**
302323 * An event triggered before lazy loading a route configuration.
303324 *
325+ * @see `RouteConfigLoadEnd`
326+ *
304327 * @publicApi
305328 */
306329export class RouteConfigLoadStart {
@@ -315,6 +338,8 @@ export class RouteConfigLoadStart {
315338/**
316339 * An event triggered when a route has been lazy loaded.
317340 *
341+ * @see `RouteConfigLoadStart`
342+ *
318343 * @publicApi
319344 */
320345export class RouteConfigLoadEnd {
@@ -348,7 +373,7 @@ export class ChildActivationStart {
348373 * An event triggered at the end of the child-activation part
349374 * of the Resolve phase of routing.
350375 * @see `ChildActivationStart`
351- * @see `ResolveStart` *
376+ * @see `ResolveStart`
352377 * @publicApi
353378 */
354379export class ChildActivationEnd {
@@ -364,7 +389,7 @@ export class ChildActivationEnd {
364389/**
365390 * An event triggered at the start of the activation part
366391 * of the Resolve phase of routing.
367- * @see ActivationEnd`
392+ * @see ` ActivationEnd`
368393 * @see `ResolveStart`
369394 *
370395 * @publicApi
@@ -422,24 +447,33 @@ export class Scroll {
422447/**
423448 * Router events that allow you to track the lifecycle of the router.
424449 *
425- * The sequence of router events is as follows:
426- *
427- * - `NavigationStart`,
428- * - `RouteConfigLoadStart`,
429- * - `RouteConfigLoadEnd`,
430- * - `RoutesRecognized`,
431- * - `GuardsCheckStart`,
432- * - `ChildActivationStart`,
433- * - `ActivationStart`,
434- * - `GuardsCheckEnd`,
435- * - `ResolveStart`,
436- * - `ResolveEnd`,
437- * - `ActivationEnd`
438- * - `ChildActivationEnd`
439- * - `NavigationEnd`,
440- * - `NavigationCancel`,
441- * - `NavigationError`
442- * - `Scroll`
450+ * The events occur in the following sequence:
451+ *
452+ * * [NavigationStart](api/router/NavigationStart): Navigation starts.
453+ * * [RouteConfigLoadStart](api/router/RouteConfigLoadStart): Before
454+ * the router [lazy loads](/guide/router#lazy-loading) a route configuration.
455+ * * [RouteConfigLoadEnd](api/router/RouteConfigLoadEnd): After a route has been lazy loaded.
456+ * * [RoutesRecognized](api/router/RoutesRecognized): When the router parses the URL
457+ * and the routes are recognized.
458+ * * [GuardsCheckStart](api/router/GuardsCheckStart): When the router begins the *guards*
459+ * phase of routing.
460+ * * [ChildActivationStart](api/router/ChildActivationStart): When the router
461+ * begins activating a route's children.
462+ * * [ActivationStart](api/router/ActivationStart): When the router begins activating a route.
463+ * * [GuardsCheckEnd](api/router/GuardsCheckEnd): When the router finishes the *guards*
464+ * phase of routing successfully.
465+ * * [ResolveStart](api/router/ResolveStart): When the router begins the *resolve*
466+ * phase of routing.
467+ * * [ResolveEnd](api/router/ResolveEnd): When the router finishes the *resolve*
468+ * phase of routing successfuly.
469+ * * [ChildActivationEnd](api/router/ChildActivationEnd): When the router finishes
470+ * activating a route's children.
471+ * * [ActivationEnd](api/router/ActivationStart): When the router finishes activating a route.
472+ * * [NavigationEnd](api/router/NavigationEnd): When navigation ends successfully.
473+ * * [NavigationCancel](api/router/NavigationCancel): When navigation is canceled.
474+ * * [NavigationError](api/router/NavigationError): When navigation fails
475+ * due to an unexpected error.
476+ * * [Scroll](api/router/Scroll): When the user scrolls.
443477 *
444478 * @publicApi
445479 */
0 commit comments