Example

What Does ngAnimate Do?

The ngAnimate module adds and removes classes.

The ngAnimate module does not animate your HTML elements, but when ngAnimate notice
certain events, like hide or show of an HTML element, the element
gets some pre-defined classes which can be used to make animations.

The directives in AngularJS who add/remove classes are:

ng-show

ng-hide

ng-class

ng-view

ng-include

ng-repeat

ng-if

ng-switch

The ng-show and ng-hide directives adds or removes
a ng-hide class value.

The other directives adds a ng-enter class value when they enter
the DOM, and a ng-leave attribute when they are removed from the DOM.

The ng-repeat directive also adds a ng-move class
value when the HTML element changes position.

In addition, during the animation, the HTML element will have a set
of class values, which will be removed when the animation has finished. Example: the
ng-hide directive will add these class values:

ng-animate

ng-hide-animate

ng-hide-add (if the element will be hidden)

ng-hide-remove (if the element will be showed)

ng-hide-add-active (if the element will be hidden)

ng-hide-remove-active (if the element will be showed)

Animations Using CSS

We can use CSS transitions or CSS animations to animate HTML elements. This tutorial will show you
both.