0
、あなたはNG-ショーとともに要素にアニメーションショーのようなCSSクラスを追加することもできますが、要素がレンダリングされていないので、同じことが角度2のngIfで行うことができませんすべて隠されている間。アニメイト・ショーのために角度1で使用しAngular 2のngIfにアニメーションの表示/非表示を追加するには?アンギュラ1では
CSS:アンギュラ1では
.animate-show.ng-hide-add, .animate-show.ng-hide-remove, .animate-hide.ng-
hide-add, .animate-hide.ng-hide-remove {
transition: all linear 0.2s;
}
.animate-show.ng-hide-add-active,
.animate-show.ng-hide-remove-active,
.animate-hide.ng-hide-add-active,
.animate-hide.ng-hide-remove-active {
/* the transition is defined in the active class */
transition: 1s linear all;
}
.animate-show.ng-hide-add, .animate-show.ng-hide-remove {
transition: all linear 0.2s;
}
.animate-show.ng-hide {
line-height: 0;
opacity: 0;
padding: 0 2px;
}
、あなたが必要とするすべての要素に「-ショーをアニメーション化」し、それが行くように良いことだCSSクラスを追加することです。
角度2でこれを達成する簡単な方法はありますか?
Angular 1.0で使用したクラス名を適用する属性ですか? – JEMI