##AngularJS custom directives animations
$animate method's signatures:
$animate.addClass(element, className); $animate.removeClass(element, className);
Both functions receive the element parameter that will have a class added or removed and the className class that will be used and return a promise that is resolved once the animation has completed itself or has been cancelled.
There are three more methods that can be used to trigger animations:
$animate.enter(element, parentElement, afterElement); $animation.leave(element); $animation.move(element, parentElement, afterElement);