-
Notifications
You must be signed in to change notification settings - Fork 27.4k
ngAnimate does not support animation-iteration-count, animation-direction, etc. yet #3034
Comments
It already supports AnimationIterationCount (https://github.com/angular/angular.js/blob/master/src/ng/animator.js#L363). And direction shouldn't affect the timing values in the animation so it should work as usual. Have you given it a try yet? Regarding classes. Can you elaborate more on this? There are plans to change ngAnimate to use ngClass primarily with specific classes per animation event (that might actually stick around after the animation is complete). But this might not be what you're talking about. |
I used the animation shorthand and it doesn't appear to be working: Regarding the second part I was just wondering how ngAnimate parses CSS rules =p |
Ahh, infinite isn't supported no. NgAnimate just expands the window between DOM operations and there is always a finite amount of time in between. In other words, animations always end. If you really want to do something like this then just add a high number as the animation iteration count. NgAnimate will soon be CSS-selector based and will work behind the scenes with class and ngClass. I'll explain more once I have the experimental stuff out of the way. |
Hey @gsklee is this still an issue? Infinite will always turn into an iteration of 1 and animation direction is only handled by CSS and has nothing to do with $animator. |
Hmm not sure, setting a high iteration count would work but sounds hackish. I presume that this issue would be solved when we move the implementation to be ngClass-based though. |
Closing this for now since ngAnimate will be relying on the transitionend and animationend animation events so you can create infinite animation loops if you really want after this PR gets merged: #3882 |
@matsko Cool ;) |
@matsko I guess support is already on the way?
Also - are we using some kind of CSS parser in ngAnimate's implementation? I thought it's like Angular will hook the CSS classes onto elements at proper timing etc., but partial support on available properties seem to be hinting otherwise.
The text was updated successfully, but these errors were encountered: