私はAngular 1.5を使用するアプリケーションを持っています。単純なアニメーションを処理するにはngAnimateとanimate.cssを使用しています。私は子要素をアニメーション化し、ng-ifを介してng-enter/leaveがその親に適用される必要がある問題に遭遇しています。ここでngAnimateとanimate.cssで子要素をアニメ化する
は私のマークアップです:ここでは
<div class="parent" ng-if="vm.showPanel">
<div class="child animated"> <!--This is the element that need the animation-->
some content
</div>
</div>
は、CSSです:
.parent.ng-enter > div.child{
animation: bounceInRight 1s;
}
.parent.ng-leave > div.child{
animation: bounceOutRight 1s;
}
私は親要素にアニメーションを適用する場合、それはうまく動作しますが、私はその子要素でそれを必要とします。助言がありますか??私はこれがかなりまっすぐなものでなければならないことを知っているが、私は何が欠けているのか分からない。事前におかげで。
あなたは[ '= "true" を' NG-アニメーション-子供]を見てきました(https://code.angularjs.org/1.5.8/docs/api/ngAnimate/directive/ngAnimateChildren)? – plong0
@ plong0私はこれを試しましたが、運はありませんでした:/ –