feat(router): add "paramsInheritanceStrategy" router configuration option
Previously, the router would merge path and matrix params, as well as data/resolve, with special rules (only merging down when the route has an empty path, or is component-less). This change adds an extra option "paramsInheritanceStrategy" which, when set to 'always', makes child routes unconditionally inherit params from parent routes. Closes #20572.
This commit is contained in:

committed by
Alex Rickabaugh

parent
5f23a1223f
commit
5efea2f6a0
2
tools/public_api_guard/router/router.d.ts
vendored
2
tools/public_api_guard/router/router.d.ts
vendored
@ -127,6 +127,7 @@ export interface ExtraOptions {
|
||||
errorHandler?: ErrorHandler;
|
||||
initialNavigation?: InitialNavigation;
|
||||
onSameUrlNavigation?: 'reload' | 'ignore';
|
||||
paramsInheritanceStrategy?: 'emptyOnly' | 'always';
|
||||
preloadingStrategy?: any;
|
||||
useHash?: boolean;
|
||||
}
|
||||
@ -329,6 +330,7 @@ export declare class Router {
|
||||
readonly events: Observable<Event>;
|
||||
navigated: boolean;
|
||||
onSameUrlNavigation: 'reload' | 'ignore';
|
||||
paramsInheritanceStrategy: 'emptyOnly' | 'always';
|
||||
routeReuseStrategy: RouteReuseStrategy;
|
||||
readonly routerState: RouterState;
|
||||
readonly url: string;
|
||||
|
Reference in New Issue
Block a user