feat(router): add queryParams and fragment to every activated route
This commit is contained in:
@ -649,7 +649,6 @@ class ActivateRoutes {
|
||||
const currRoot = this.currState ? this.currState._root : null;
|
||||
advanceActivatedRoute(this.futureState.root);
|
||||
this.activateChildRoutes(futureRoot, currRoot, parentOutletMap);
|
||||
pushQueryParamsAndFragment(this.futureState);
|
||||
}
|
||||
|
||||
private activateChildRoutes(
|
||||
@ -758,16 +757,6 @@ function closestLoadedConfig(
|
||||
return b.length > 0 ? (<any>b[b.length - 1])._routeConfig._loadedConfig : null;
|
||||
}
|
||||
|
||||
function pushQueryParamsAndFragment(state: RouterState): void {
|
||||
if (!shallowEqual(state.snapshot.queryParams, (<any>state.queryParams).value)) {
|
||||
(<any>state.queryParams).next(state.snapshot.queryParams);
|
||||
}
|
||||
|
||||
if (state.snapshot.fragment !== (<any>state.fragment).value) {
|
||||
(<any>state.fragment).next(state.snapshot.fragment);
|
||||
}
|
||||
}
|
||||
|
||||
function nodeChildrenAsMap(node: TreeNode<any>) {
|
||||
return node ? node.children.reduce((m: any, c: TreeNode<any>) => {
|
||||
m[c.value.outlet] = c;
|
||||
|
Reference in New Issue
Block a user