fix(router): adjust ChildActivation events to only fire when the child is actually changing (#19043)
* The problem was with the `fireChildActivationStart` function. It was taking a `path` param, which was an array of `ActivatedRouteSnapshot`s. The function was being fired for each piece of the route that was being activated. This resulted in far too many `ChildActivationStart` events being fired, and being fired on routes that weren't actually getting activated. This change fires the event only for those routes that are actually being activated. fixes #18942 PR Close #19043
This commit is contained in:
8
tools/public_api_guard/router/index.d.ts
vendored
8
tools/public_api_guard/router/index.d.ts
vendored
@ -61,17 +61,17 @@ export interface CanLoad {
|
||||
|
||||
/** @experimental */
|
||||
export declare class ChildActivationEnd {
|
||||
route: Route;
|
||||
snapshot: ActivatedRouteSnapshot;
|
||||
constructor(
|
||||
route: Route);
|
||||
snapshot: ActivatedRouteSnapshot);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class ChildActivationStart {
|
||||
route: Route;
|
||||
snapshot: ActivatedRouteSnapshot;
|
||||
constructor(
|
||||
route: Route);
|
||||
snapshot: ActivatedRouteSnapshot);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user