diff --git a/src/ngRoute/route.js b/src/ngRoute/route.js index 34f3f9ec05f1..cbef4caf7d12 100644 --- a/src/ngRoute/route.js +++ b/src/ngRoute/route.js @@ -586,10 +586,10 @@ function $RouteProvider(){ if (i === 0) { result.push(segment); } else { - var segmentMatch = segment.match(/(\w+)(.*)/); + var segmentMatch = segment.match(/(\w+)([\?\*])?(.*)/); var key = segmentMatch[1]; result.push(params[key]); - result.push(segmentMatch[2] || ''); + result.push(segmentMatch[3] || ''); delete params[key]; } });