diff --git a/modules/@angular/router/src/recognize.ts b/modules/@angular/router/src/recognize.ts index b2bd8cc598..b2cdd80511 100644 --- a/modules/@angular/router/src/recognize.ts +++ b/modules/@angular/router/src/recognize.ts @@ -99,11 +99,11 @@ function checkOutletNameUniqueness(nodes: TreeNode[]): function matchNode(config: Route[], url: TreeNode): 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;