diff --git a/src/urlMatcherFactory.js b/src/urlMatcherFactory.js index d02fe506b..0521fd531 100644 --- a/src/urlMatcherFactory.js +++ b/src/urlMatcherFactory.js @@ -140,7 +140,7 @@ function UrlMatcher(pattern, config) { compiled += quoteRegExp(segment) + '$'; segments.push(segment); - this.regexp = RegExp(compiled, config.caseInsensitive ? 'i' : undefined); + this.regexp = new RegExp(compiled, config.caseInsensitive ? 'i' : undefined); this.prefix = segments[0]; } diff --git a/src/urlRouter.js b/src/urlRouter.js index bfa22fe0e..3b7fb8d13 100644 --- a/src/urlRouter.js +++ b/src/urlRouter.js @@ -247,7 +247,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { this.deferIntercept = function (defer) { if (defer === undefined) defer = true; interceptDeferred = defer; - } + }; /** * @ngdoc object