summaryrefslogtreecommitdiff
path: root/xstatic/pkg/angular/data/angular-route.js
diff options
context:
space:
mode:
authorRob Cresswell <robert.cresswell@outlook.com>2016-04-20 11:27:00 +0100
committerRob Cresswell <robert.cresswell@outlook.com>2016-04-20 11:27:35 +0100
commit65cde9c21257795353c9d111c232596de1bcb995 (patch)
treefb67910cb984770e441c35c6c0028883a4592667 /xstatic/pkg/angular/data/angular-route.js
parentaee8cd393d9a8fe6f50211265712740f6d8568d4 (diff)
downloadxstatic-angular-65cde9c21257795353c9d111c232596de1bcb995.tar.gz
Update XStatic-Angular to 1.4.10
Change-Id: Ie61a6282f792a8721674014dc11f2e2a2ec1245b
Diffstat (limited to 'xstatic/pkg/angular/data/angular-route.js')
-rw-r--r--xstatic/pkg/angular/data/angular-route.js31
1 files changed, 19 insertions, 12 deletions
diff --git a/xstatic/pkg/angular/data/angular-route.js b/xstatic/pkg/angular/data/angular-route.js
index 6b54cb6..c768251 100644
--- a/xstatic/pkg/angular/data/angular-route.js
+++ b/xstatic/pkg/angular/data/angular-route.js
@@ -1,6 +1,6 @@
/**
- * @license AngularJS v1.3.18
- * (c) 2010-2014 Google, Inc. http://angularjs.org
+ * @license AngularJS v1.4.10
+ * (c) 2010-2015 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';
@@ -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.
@@ -206,9 +206,9 @@ function $RouteProvider() {
path = path
.replace(/([().])/g, '\\$1')
- .replace(/(\/)?:(\w+)([\?\*])?/g, function(_, slash, key, option) {
- var optional = option === '?' ? option : null;
- var star = option === '*' ? option : null;
+ .replace(/(\/)?:(\w+)(\*\?|[\?\*])?/g, function(_, slash, key, option) {
+ var optional = (option === '?' || option === '*?') ? '?' : null;
+ var star = (option === '*' || option === '*?') ? '*' : null;
keys.push({ name: key, optional: !!optional });
slash = slash || '';
return ''
@@ -468,10 +468,18 @@ function $RouteProvider() {
*/
reload: function() {
forceReload = true;
+
+ var fakeLocationEvent = {
+ defaultPrevented: false,
+ preventDefault: function fakePreventDefault() {
+ this.defaultPrevented = true;
+ forceReload = false;
+ }
+ };
+
$rootScope.$evalAsync(function() {
- // Don't support cancellation of a reload for now...
- prepareRoute();
- commitRoute();
+ prepareRoute(fakeLocationEvent);
+ if (!fakeLocationEvent.defaultPrevented) commitRoute();
});
},
@@ -609,8 +617,8 @@ function $RouteProvider() {
return $q.all(locals);
}
}).
- // after route change
then(function(locals) {
+ // after route change
if (nextRoute == $route.current) {
if (nextRoute) {
nextRoute.locals = locals;
@@ -796,7 +804,6 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
}
.view-animate.ng-enter, .view-animate.ng-leave {
- -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
display:block;