From 2c4107c531623d396ef0229ad90c60ea0a4b2a11 Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Mon, 11 Sep 2017 20:27:33 +0200 Subject: [PATCH] fix(router): fix activation events toString and docs (#19147) PR Close #19147 --- packages/router/src/events.ts | 7 ++++--- packages/router/src/pre_activation.ts | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/router/src/events.ts b/packages/router/src/events.ts index e9ca1b1a2a..b6a5d46fca 100644 --- a/packages/router/src/events.ts +++ b/packages/router/src/events.ts @@ -300,7 +300,7 @@ export class ActivationStart { public snapshot: ActivatedRouteSnapshot) {} toString(): string { const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || ''; - return `ChildActivationStart(path: '${path}')`; + return `ActivationStart(path: '${path}')`; } } @@ -316,7 +316,7 @@ export class ActivationEnd { public snapshot: ActivatedRouteSnapshot) {} toString(): string { const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || ''; - return `ChildActivationEnd(path: '${path}')`; + return `ActivationEnd(path: '${path}')`; } } @@ -331,9 +331,11 @@ export class ActivationEnd { * - {@link RoutesRecognized}, * - {@link GuardsCheckStart}, * - {@link ChildActivationStart}, + * - {@link ActivationStart}, * - {@link GuardsCheckEnd}, * - {@link ResolveStart}, * - {@link ResolveEnd}, + * - {@link ActivationEnd} * - {@link ChildActivationEnd} * - {@link NavigationEnd}, * - {@link NavigationCancel}, @@ -343,4 +345,3 @@ export class ActivationEnd { */ export type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd | ActivationStart | ActivationEnd; -; diff --git a/packages/router/src/pre_activation.ts b/packages/router/src/pre_activation.ts index ba20b1f899..ae3630c320 100644 --- a/packages/router/src/pre_activation.ts +++ b/packages/router/src/pre_activation.ts @@ -211,10 +211,10 @@ export class PreActivation { } /** - * This should fire off `ChildActivationStart` events for each route being activated at this + * This should fire off `ActivationStart` events for each route being activated at this * level. * In other words, if you're activating `a` and `b` below, `path` will contain the - * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always + * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always * return * `true` so checks continue to run. */