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.js17
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;
}
}