在AngularJS 1.2中,如果我使用父级动画,子级动画不起作用。ngAnimate父母与孩子在AngularJS 1.2
如果我注释掉app.animation('.parent', function() { .. }
,那么子动画将正确启动。
如何让父母和小孩的动画同时工作?
HTML:
<button ng-click="anim.toggleParent()">reveal parent</button>
<button ng-click="anim.toggleChild()">reveal child</button>
<div class="parent" ng-if="!anim.showParent">
<div class="child" ng-if="!anim.showChild">
</div>
</div>
JS:
app.animation('.parent', function() {
return {
// ...
};
});
// this doesn't work with parent animation =(
app.animation('.child', function() {
return {
// ...
};
});