diff options
Diffstat (limited to 'js/vendor/angular-route/angular-route.js')
-rw-r--r-- | js/vendor/angular-route/angular-route.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/js/vendor/angular-route/angular-route.js b/js/vendor/angular-route/angular-route.js index edd7d6e77..539edc47d 100644 --- a/js/vendor/angular-route/angular-route.js +++ b/js/vendor/angular-route/angular-route.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.1 + * @license AngularJS v1.3.2 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -146,10 +146,14 @@ function $RouteProvider() { * Adds a new route definition to the `$route` service. */ this.when = function(path, route) { + //copy original route object to preserve params inherited from proto chain + var routeCopy = angular.copy(route); + if (angular.isUndefined(routeCopy.reloadOnSearch)) { + routeCopy.reloadOnSearch = true; + } routes[path] = angular.extend( - {reloadOnSearch: true}, - route, - path && pathRegExp(path, route) + routeCopy, + path && pathRegExp(path, routeCopy) ); // create redirection for trailing slashes @@ -160,7 +164,7 @@ function $RouteProvider() { routes[redirectPath] = angular.extend( {redirectTo: path}, - pathRegExp(redirectPath, route) + pathRegExp(redirectPath, routeCopy) ); } @@ -442,7 +446,7 @@ function $RouteProvider() { * {@link ng.$location $location} hasn't changed. * * As a result of that, {@link ngRoute.directive:ngView ngView} - * creates new scope, reinstantiates the controller. + * creates new scope and reinstantiates the controller. */ reload: function() { forceReload = true; |