-
Notifications
You must be signed in to change notification settings - Fork 27.4k
feat($animate): allow $animate to pass custom styles into animations #8974
Conversation
ad3eb52
to
3c1a460
Compare
Should the mixed in style be removed once the animation is done? I'm on cell so can't do proper review but from what I've see this looks good. |
The styles should persist. If you look at the demo, you'll see that the goal is to place the box at the given coordinates. The animation that runs in between is just extra. If we removed the styles and if there is no animation or if ngAnimate is not activated then nothing would happen. |
3c1a460
to
48fef8a
Compare
02dc2aa
to
fd2d6c0
Compare
I don't like that the styles are added via I would prefer an |
abdaab7
to
30996f8
Compare
3ba919c
to
3d88d51
Compare
$animate now supports an optional parameter which provides CSS styling which will be provided into the CSS-based animations as well as any custom animation functions. Once the animation is complete then the styles will be applied directly to the element. If no animation is detected or the `ngAnimate` module is not active then the styles will be applied immediately. BREAKING CHANGE: staggering animations that use transitions will now always block the transition from starting (via `transition: 0s none`) up until the stagger step kicks in. The former behaviour was that the block was removed as soon as the pending class was added. This fix allows for styles to be applied in the pending class without causing an animation to trigger prematurely.
3d88d51
to
a02f29c
Compare
a02f29c
to
09cc1dc
Compare
The problem with this, as has been mentioned previously, is that
I think this could have been done better, this should not have shipped yet =\ now we can't even fix it without breaking changes u_u which means we can't really fix it |
$animate now supports an optional parameter which provides CSS styling
which will be provided into the CSS-based animations as well as any
custom animation functions. Once the animation is complete then the
styles will be applied directly to the element. If no animation is
detected or the
ngAnimate
module is not active then the styleswill be applied immediately.
BREAKING CHANGE: staggering animations that use transitions will now
always block the transition from starting (via
transition: 0s none
)up until the stagger step kicks in. The former behaviour was that the
block was removed as soon as the pending class was added. This fix
allows for styles to be applied in the pending class without causing
an animation to trigger prematurely.
---- DEMO -----
https://s3.amazonaws.com/angularjs-dev/ng-animate-piggyback/index.html