@@ -187,7 +187,7 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
187
187
var element = animationEntry . from ? animationEntry . from . element : animationEntry . element ;
188
188
var extraClasses = options . addClass ;
189
189
extraClasses = ( extraClasses ? ( extraClasses + ' ' ) : '' ) + NG_ANIMATE_CLASSNAME ;
190
- var cacheKey = $$animateCache . cacheKey ( node , event , extraClasses , options . removeClass ) ;
190
+ var cacheKey = $$animateCache . cacheKey ( node , animationEntry . event , extraClasses , options . removeClass ) ;
191
191
192
192
toBeSortedAnimations . push ( {
193
193
element : element ,
@@ -199,6 +199,7 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
199
199
// and it's in fact an invalid animation (something that has duration = 0)
200
200
// then we should skip all the heavy work from here on
201
201
if ( $$animateCache . containsCachedAnimationWithoutDuration ( cacheKey ) ) {
202
+ removePrepareClass ( ) ;
202
203
closeFn ( ) ;
203
204
return ;
204
205
}
@@ -399,17 +400,21 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
399
400
}
400
401
}
401
402
402
- function beforeStart ( ) {
403
- tempClasses = ( tempClasses ? ( tempClasses + ' ' ) : '' ) + NG_ANIMATE_CLASSNAME ;
404
- $$jqLite . addClass ( element , tempClasses ) ;
405
-
403
+ function removePrepareClass ( ) {
406
404
var prepareClassName = element . data ( PREPARE_CLASSES_KEY ) ;
407
405
if ( prepareClassName ) {
408
406
$$jqLite . removeClass ( element , prepareClassName ) ;
409
407
prepareClassName = null ;
410
408
}
411
409
}
412
410
411
+ function beforeStart ( ) {
412
+ tempClasses = ( tempClasses ? ( tempClasses + ' ' ) : '' ) + NG_ANIMATE_CLASSNAME ;
413
+ $$jqLite . addClass ( element , tempClasses ) ;
414
+
415
+ removePrepareClass ( ) ;
416
+ }
417
+
413
418
function updateAnimationRunners ( animation , newRunner ) {
414
419
if ( animation . from && animation . to ) {
415
420
update ( animation . from . element ) ;
0 commit comments