Creating removeClass animations with ngClass
AngularJS provides hooks that can be used to define a custom animation when a directive fires a removeClass event. The following directives will generate removeClass events:
ngShow: This fires theremoveClassevent after thengShowexpression evaluates to a non-truthy value, and just before the contents are set to hiddenngHide: This fires theremoveClassevent after thengHideexpression evaluates to a truthy value, and just before the contents are set to hiddenngClass: This fires theremoveClassevent just before the class is removed from the elementngForm: This fires theremoveClassevent to remove validation classesngModel: This fires theremoveClassevent to remove validation classesngMessages: This fires theremoveClassevent to remove theng-activeclass when there are no messages, or to remove theng-inactiveclass when one or more messages are visible
Getting ready
Suppose that you want to have a div element slide out of the view when a class...