summaryrefslogtreecommitdiff
path: root/xstatic/pkg/angular/data/angular-route.js
diff options
context:
space:
mode:
Diffstat (limited to 'xstatic/pkg/angular/data/angular-route.js')
-rw-r--r--xstatic/pkg/angular/data/angular-route.js27
1 files changed, 12 insertions, 15 deletions
diff --git a/xstatic/pkg/angular/data/angular-route.js b/xstatic/pkg/angular/data/angular-route.js
index 834429b..6b54cb6 100644
--- a/xstatic/pkg/angular/data/angular-route.js
+++ b/xstatic/pkg/angular/data/angular-route.js
@@ -1,5 +1,5 @@
/**
- * @license AngularJS v1.3.7
+ * @license AngularJS v1.3.18
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -412,7 +412,9 @@ function $RouteProvider() {
* @name $route#$routeChangeSuccess
* @eventType broadcast on root scope
* @description
- * Broadcasted after a route dependencies are resolved.
+ * Broadcasted after a route change has happened successfully.
+ * The `resolve` dependencies are now available in the `current.locals` property.
+ *
* {@link ngRoute.directive:ngView ngView} listens for the directive
* to instantiate the controller and render the view.
*
@@ -440,9 +442,11 @@ function $RouteProvider() {
* @name $route#$routeUpdate
* @eventType broadcast on root scope
* @description
- *
* The `reloadOnSearch` property has been set to false, and we are reusing the same
* instance of the Controller.
+ *
+ * @param {Object} angularEvent Synthetic event object
+ * @param {Route} current Current/previous route information.
*/
var forceReload = false,
@@ -482,21 +486,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');
}
}
@@ -600,9 +598,8 @@ function $RouteProvider() {
if (angular.isFunction(templateUrl)) {
templateUrl = templateUrl(nextRoute.params);
}
- templateUrl = $sce.getTrustedResourceUrl(templateUrl);
if (angular.isDefined(templateUrl)) {
- nextRoute.loadedTemplateUrl = templateUrl;
+ nextRoute.loadedTemplateUrl = $sce.valueOf(templateUrl);
template = $templateRequest(templateUrl);
}
}