O'Reilly logo

AngularJS Web Application Development Cookbook by Matt Frisbie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 the addClass event after the ngShow expression evaluates to a truthy value, and just before the contents are set to visible
  • ngHide: This fires the addClass event after the ngHide expression evaluates to a non-truthy value, and just before the contents are set to visible
  • ngClass: This fires the addClass event just before the class is applied to the element
  • ngForm: This fires the addClass event to add validation classes
  • ngModel: This fires the addClass event to add validation classes
  • ngMessages: This is fired to add the ng-active class when ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required