VOOZH about

URL: https://www.geeksforgeeks.org/angular-js/angularjs-animations/

⇱ AngularJS Animations - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

AngularJS Animations

Last Updated : 6 Sep, 2022

To create animation effects in AngularJS using the ngAnimate module, which provides support for CSS-based animations. Animation is something that is used to give a dynamic motion effect. Here HTML is transformed to give an illusion of motion using the ngAnimate module that gives us a combined effect of Javascript and CSS. Using this sample code, the demonstration of hiding the division/section is shown up by checking the checkbox. 

Steps to bring Animation using AngularJs into the picture:

Include Angular.Js animate lib in script tag as:

src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-animate.js"

Refer to the ngAnimate module inside the body tag as:

ng-app="ngAnimate"

ngAnimate module adds and removes classes. The Directives used in AngularJS that add/remove classes are:

ng-show, ng-hide

Example: This example describes the implementation of Angular.Js animation.

Output:

👁 Image
 
Comment

Explore