fix(router): supports index routes with path

This commit is contained in:
vsavkin 2016-06-08 19:00:59 -07:00
parent 131914ac94
commit 3f90659cc1
1 changed files with 4 additions and 4 deletions

View File

@ -99,11 +99,11 @@ function checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]):
function matchNode(config: Route[], url: TreeNode<UrlSegment>): MatchResult[] {
const res = [];
for (let r of config) {
if (r.index) {
const m = matchWithParts(r, url);
if (m) {
res.push(m);
} else if (r.index) {
res.push(createIndexMatch(r, [url], url.value));
} else {
const m = matchWithParts(r, url);
if (m) res.push(m);
}
}
return res;