docs(router): Clarify 'parent' for params inheritance (#40304)
When talking about parameter inheritance, one might think that matrix parameters can be inherited from the "parent" segment, or the segment which appears immediately to the left. In reality, when we talk about a "parent" in the `Router`, we mean the parent `Route` config. This config may contain more than one segment and matrix parameters must appear at the end or they do not "belong" to any config. PR Close #40304
This commit is contained in:
parent
e43f7e26fe
commit
605775398f
|
@ -360,7 +360,15 @@ export interface ExtraOptions {
|
|||
* Defines how the router merges parameters, data, and resolved data from parent to child
|
||||
* routes. By default ('emptyOnly'), inherits parent parameters only for
|
||||
* path-less or component-less routes.
|
||||
*
|
||||
* Set to 'always' to enable unconditional inheritance of parent parameters.
|
||||
*
|
||||
* Note that when dealing with matrix parameters, "parent" refers to the parent `Route`
|
||||
* config which does not necessarily mean the "URL segment to the left". When the `Route` `path`
|
||||
* contains multiple segments, the matrix parameters must appear on the last segment. For example,
|
||||
* matrix parameters for `{path: 'a/b', component: MyComp}` should appear as `a/b;foo=bar` and not
|
||||
* `a;foo=bar/b`.
|
||||
*
|
||||
*/
|
||||
paramsInheritanceStrategy?: 'emptyOnly'|'always';
|
||||
|
||||
|
|
Loading…
Reference in New Issue