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 theremoveClass
event after thengShow
expression evaluates to a non-truthy value, and just before the contents are set to hiddenngHide
: This fires theremoveClass
event after thengHide
expression evaluates to a truthy value, and just before the contents are set to hiddenngClass
: This fires theremoveClass
event just before the class is removed from the elementngForm
: This fires theremoveClass
event to remove validation classesngModel
: This fires theremoveClass
event to remove validation classesngMessages
: This ...
Get AngularJS Web Application Development Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.