To add these classes, you need to load the animation module into the application.
Refer to the ngAnimate docs for how to do this.
First you must download the extension module .js file:
<script src="angular.js"> <script src="angular-animate.js">
Then list it as the dependent module of your application:
angular.module('app', ['ngAnimate']);
The ngAnimate module also requires the element to have its transition defined in CSS or JS:
For CSS transitions, the transition code must be defined at the beginning of the CSS class (in this case .ng-enter). The target class is what the transition will bring to life.
If you add something like:
.fade.ng-enter { transition:0.5s linear all; opacity:0; } .fade.ng-enter.ng-enter-active { opacity:1; }
He should start working.
To be extremely clear, since the documents do not say this explicitly: if the animation is not defined either in CSS or in JS, the ngAnimate module will not even add classes, it will simply skip the animation together.
source share