From 3f90659cc1caaa3c74617e7a6c42ba5d8c6e4e23 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Wed, 8 Jun 2016 19:00:59 -0700 Subject: [PATCH] fix(router): supports index routes with path --- modules/@angular/router/src/recognize.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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;