ngAnimateChildren allows you to specify that children of this element should animate even if any
of the children's parents are currently animating. By default, when an element has an active enter
, leave
, or move
(structural) animation, child elements that also have an active structural animation are not animated.
Note that even if ngAnimteChildren
is set, no child animations will run when the parent element is removed from the DOM (leave
animation).
<ng-animate-children
ng-animate-children="string">
...
</ng-animate-children>
<ANY
ng-animate-children="string">
...
</ANY>
Param | Type | Details |
---|---|---|
ngAnimateChildren | string |
If the value is empty, |
<div ng-controller="mainController as main">
<label>Show container? <input type="checkbox" ng-model="main.enterElement" /></label>
<label>Animate children? <input type="checkbox" ng-model="main.animateChildren" /></label>
<hr>
<div ng-animate-children="{{main.animateChildren}}">
<div ng-if="main.enterElement" class="container">
List of items:
<div ng-repeat="item in [0, 1, 2, 3]" class="item">Item {{item}}</div>
</div>
</div>
</div>