Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Make ngAnimate work as closely as possible to natural CSS transitions #5646

Closed
wants to merge 3 commits into from

Conversation

matsko
Copy link
Contributor

@matsko matsko commented Jan 6, 2014

NgAnimate and natural CSS transitions are not 1-1 in terms of behaviour (yet), but this fix brings 1.2 to work alongside natural CSS transitions much better. With 1.3 the API will be changed so things are more fluid, but this fix should handle a good amount of the class-based bugs that are appearing in ngAnimate.

Long story short, if you remove ngAnimate from your application it should perform the exact same for CSS-based transitions and keyframe animations triggered by $animate.addClass and/or ngClass.

Closes #5588
Closes #5191

Here's an example of what should happen:

Natural CSS animations without ngAnimate
http://jsfiddle.net/7vk7p/3/

And this is how it is expected to be with ngAnimate
https://s3.amazonaws.com/angularjs-dev/ng-animate-race-condition-fix/example/animate.html

This is how it currently is:
http://jsfiddle.net/7vk7p/2/

matsko added 2 commits January 5, 2014 17:13
…ing class addition and removal

When a CSS class containing transition code is added to an element then an animation should kick off.
ngAnimate doesn't do this. It only respects transition styles that are already present on the element
or on the setup class (but not the addClass animation).
@matsko matsko closed this Jan 6, 2014
@matsko matsko deleted the pr_5588 branch January 6, 2014 05:40
@matsko matsko restored the pr_5588 branch January 6, 2014 05:40
@matsko matsko reopened this Jan 6, 2014
@ghost ghost assigned matsko Jan 6, 2014
@Narretz
Copy link
Contributor

Narretz commented Jan 12, 2014

What's holding this back?

@matsko matsko closed this Jan 14, 2014
@matsko
Copy link
Contributor Author

matsko commented Jan 14, 2014

Moved to #5749

@matsko matsko deleted the pr_5588 branch January 24, 2014 18:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants