fix(router): supports index routes with path
This commit is contained in:
parent
131914ac94
commit
3f90659cc1
|
@ -99,11 +99,11 @@ function checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]):
|
||||||
function matchNode(config: Route[], url: TreeNode<UrlSegment>): MatchResult[] {
|
function matchNode(config: Route[], url: TreeNode<UrlSegment>): MatchResult[] {
|
||||||
const res = [];
|
const res = [];
|
||||||
for (let r of config) {
|
for (let r of config) {
|
||||||
if (r.index) {
|
|
||||||
res.push(createIndexMatch(r, [url], url.value));
|
|
||||||
} else {
|
|
||||||
const m = matchWithParts(r, url);
|
const m = matchWithParts(r, url);
|
||||||
if (m) res.push(m);
|
if (m) {
|
||||||
|
res.push(m);
|
||||||
|
} else if (r.index) {
|
||||||
|
res.push(createIndexMatch(r, [url], url.value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Reference in New Issue