add と remove を使用して通常の構文で ng-class ディレクティブに js 定義のアニメーションをアタッチしようとしていますが、アニメーションは実行されません。ログを記録すると、追加関数と削除関数が呼び出されないことがわかります。
app.animation( ".bob", function () {
return {
add : function ( element, done ) {
// Do add animation here and call done when done.
},
remove : function ( element, done ) {
// Do remove animation here and call done when done.
}
}
} );
これは通常、ngIf のような他のディレクティブでは、アニメーションの開始と終了で正常に動作しますが、ngClass では、ドキュメントの例で証明されているように、css-animations でのみ動作するようです。