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 theaddClass
event after thengShow
expression evaluates to a truthy value, and just before the contents are set to visiblengHide
: This fires theaddClass
event after thengHide
expression evaluates to a non-truthy value, and just before the contents are set to visiblengClass
: This fires theaddClass
event just before the class is applied to the elementngForm
: This fires theaddClass
event to add validation classesngModel
: This fires theaddClass
event to add validation classesngMessages
: This is fired to add theng-active
class when one or more messages are visible, or to add theng-inactive
class when there are no messages