ng-animate : nesting animations / running multiple animations at once
Generally i want to nest javascript animations.
I try to animate page changes with ng-view and child elements of these views with ng-show simultaneously, but the child element's animations are ignored. It looks like they're skipped, 'removeClass' doesn't get called. Delaying the child animations until the parent's ng-view animation is complete works. Is that behaviour intended?
I believe this just became possible with commit https://github.com/angular/angular.js/commit/8252b8be946367f1759065adf528adc908da00a2, which will be part of the next beta. Can you check if this solves your problem?
I tried the master branch (was using v1.2.19 before) but no luck.
Using a custom directive instead of ng-show seems to work (as a workaround).
In the meantime i found this post: http://jamiecopeland.com/2014/05/06/angular-nested-animation-issues/
Have you noticed that the new behavior is opt-in? You need to add ng-animate-children to the parent directive for child elements to animate at the same time. Would be good to see a simple plnkr of something you are trying to achieve.
Works! I missed adding ng-animate-children. Thank you.
Are these changes to ngAnimate only in the 1.3 branch? I had to fetch 1.3.0-build.2879+sha.4a8bffe. How do i get that with 1.2.x?
Let's ask @matsko if it's possible to backport this to 1.2
Yes, placing this into 1.2 should be OK since there is a need for it.
Landed as https://github.com/angular/angular.js/commit/931789ec1476e1d06739e63cb423eb87172b5ebc