Creating addClass animations with ngShow
AngularJS provides hooks used to define a custom animation when a directive fires an addClass event. The following directives will generate addClass events:
ngShow: This fires theaddClassevent after thengShowexpression evaluates to a truthy value, and just before the contents are set to visiblengHide: This fires theaddClassevent after thengHideexpression evaluates to a non-truthy value, and just before the contents are set to visiblengClass: This fires theaddClassevent just before the class is applied to the elementngForm: This fires theaddClassevent to add validation classesngModel: This fires theaddClassevent to add validation classesngMessages: This is fired to add theng-activeclass when one or more messages are visible, or to add theng-inactiveclass when there are no messages
Getting ready
Suppose that you want to attach a fade-out animation to a piece of the DOM that has an ng-show directive. Remember that ng-show does not add...