summaryrefslogtreecommitdiffstats
path: root/js/vendor/angular-route/angular-route.js
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-10-04 19:51:40 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-10-04 19:51:40 +0200
commit6448bd281b26e0e85b465695dbeee01c70b3515a (patch)
treebd8d30cb9d150d6b4571d99a347bf32f8cd578c6 /js/vendor/angular-route/angular-route.js
parent5694a1aa00a1f92e3cced90803fdcc1c11d69cb9 (diff)
update angular
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;
}
}