fix(router): fix activation events toString and docs (#19147)

PR Close #19147
This commit is contained in:
cexbrayat 2017-09-11 20:27:33 +02:00 committed by Igor Minar
parent 34fdb91899
commit 2c4107c531
2 changed files with 6 additions and 5 deletions

View File

@ -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;
;

View File

@ -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.
*/