From 0ff86c323359fba1a60bacab178e3c68528f8e1f Mon Sep 17 00:00:00 2001 From: Nicola Peduzzi Date: Tue, 6 Aug 2013 17:35:48 +0200 Subject: fix(routeProvider): parametrized routes do not match against locations that would not valorize each parameters. --- src/ngRoute/route.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ngRoute/route.js b/src/ngRoute/route.js index cd911ada..8a6dacd4 100644 --- a/src/ngRoute/route.js +++ b/src/ngRoute/route.js @@ -177,7 +177,9 @@ function $RouteProvider(){ + (optional ? '' : slash) + '(?:' + (optional ? slash : '') - + (star && '(.+)?' || '([^/]+)?') + ')' + + (star && '(.+?)' || '([^/]+)') + + (optional || '') + + ')' + (optional || ''); }) .replace(/([\/$\*])/g, '\\$1'); -- cgit v1.2.3