I've been attempting to apply js-defined animations to the ng-class directive using the standard syntax of add and remove, but for some reason, the animations are not running. After checking the logs, it seems that the add and remove functions are not being called.
app.animation( ".bob", function () {
return {
add : function ( element, done ) {
// Implement add animation here and call done when finished.
},
remove : function ( element, done ) {
// Implement remove animation here and call done when finished.
}
}
} );
This method usually works smoothly with other directives like ngIf, which have enter and leave animations, however, with ngClass, it appears to only work with css-animations as demonstrated in the example provided in the documentation