diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-04 19:51:40 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-04 19:51:40 +0200 |
commit | 6448bd281b26e0e85b465695dbeee01c70b3515a (patch) | |
tree | bd8d30cb9d150d6b4571d99a347bf32f8cd578c6 /js/vendor/angular-route/angular-route.js | |
parent | 5694a1aa00a1f92e3cced90803fdcc1c11d69cb9 (diff) |
update angular
Diffstat (limited to 'js/vendor/angular-route/angular-route.js')
-rw-r--r-- | js/vendor/angular-route/angular-route.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/js/vendor/angular-route/angular-route.js b/js/vendor/angular-route/angular-route.js index 4a7bc17fc..3d95eb529 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.0-rc.3 + * @license AngularJS v1.3.0-rc.4 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -854,7 +854,7 @@ function ngViewFactory( $route, $anchorScroll, $animate) { link: function(scope, $element, attr, ctrl, $transclude) { var currentScope, currentElement, - previousElement, + previousLeaveAnimation, autoScrollExp = attr.autoscroll, onloadExp = attr.onload || ''; @@ -862,19 +862,20 @@ function ngViewFactory( $route, $anchorScroll, $animate) { update(); function cleanupLastView() { - if(previousElement) { - previousElement.remove(); - previousElement = null; + if(previousLeaveAnimation) { + $animate.cancel(previousLeaveAnimation); + previousLeaveAnimation = null; } + if(currentScope) { currentScope.$destroy(); currentScope = null; } if(currentElement) { - $animate.leave(currentElement).then(function() { - previousElement = null; + previousLeaveAnimation = $animate.leave(currentElement); + previousLeaveAnimation.then(function() { + previousLeaveAnimation = null; }); - previousElement = currentElement; currentElement = null; } } |