summaryrefslogtreecommitdiffstats
path: root/js/vendor/angular-route/angular-route.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/vendor/angular-route/angular-route.js')
-rw-r--r--js/vendor/angular-route/angular-route.js20
1 files changed, 7 insertions, 13 deletions
diff --git a/js/vendor/angular-route/angular-route.js b/js/vendor/angular-route/angular-route.js
index 849383a38..189fd6c75 100644
--- a/js/vendor/angular-route/angular-route.js
+++ b/js/vendor/angular-route/angular-route.js
@@ -1,5 +1,5 @@
/**
- * @license AngularJS v1.4.0-build.3807+sha.b3a9bd3
+ * @license AngularJS v1.4.0-build.3834+sha.75725b4
* (c) 2010-2015 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -78,8 +78,8 @@ function $RouteProvider() {
* - `controller` – `{(string|function()=}` – Controller fn that should be associated with
* newly created scope or the name of a {@link angular.Module#controller registered
* controller} if passed as a string.
- * - `controllerAs` – `{string=}` – A controller alias name. If present the controller will be
- * published to scope under the `controllerAs` name.
+ * - `controllerAs` – `{string=}` – An identifier name for a reference to the controller.
+ * If present, the controller will be published to scope under the `controllerAs` name.
* - `template` – `{string=|function()=}` – html template as a string or a function that
* returns an html template as a string which should be used by {@link
* ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives.
@@ -482,21 +482,15 @@ function $RouteProvider() {
* definitions will be interpolated into the location's path, while
* remaining properties will be treated as query params.
*
- * @param {Object} newParams mapping of URL parameter names to values
+ * @param {!Object<string, string>} newParams mapping of URL parameter names to values
*/
updateParams: function(newParams) {
if (this.current && this.current.$$route) {
- var searchParams = {}, self=this;
-
- angular.forEach(Object.keys(newParams), function(key) {
- if (!self.current.pathParams[key]) searchParams[key] = newParams[key];
- });
-
newParams = angular.extend({}, this.current.params, newParams);
$location.path(interpolate(this.current.$$route.originalPath, newParams));
- $location.search(angular.extend({}, $location.search(), searchParams));
- }
- else {
+ // interpolate modifies newParams, only query params are left
+ $location.search(newParams);
+ } else {
throw $routeMinErr('norout', 'Tried updating route when with no current route');
}
}