AngularJS Modules
In AngularJS, a module defines an application. It is a container for the different parts of your application like controller, services, filters, directives etc. A module is used as a Main() method. Controller always belongs to a module.
Creating a module
The angular object's module() method is used to create a module. It is also called AngularJS function angular.module
Now we can add controllers, directives, filters, and more, to AngularJS application.
Adding controller to module
To add a controller to application refers to the controller with the
ng-controller directive
Adding directive to module
AnglarJS directives are used to add functionality to application. We can also add own directives for applications
Modules and controllers in file
In AngularJS applications, we can put the module and the controllers in JavaScript files.
Step 1) Define the code for the multiple modules and controllers. Step 2) Create your main application files.
Example: Create a file “utilities.js” which contains the various modules and controllers needed for application.
AngularJS Animation In AngularJS, you can build animated transition with the help of CSS. The CSS transforms the HTML elements that give you an illusion of motion.
The ngAnimate module does not animate HTML elements itself. It only adds and removes some pre-defined classes to make animations when ngAnimate notice certain events, like hide or show of an HTML element.
Following is a list of directives in AngularJS who add/remove classes:
o ng-show o ng-hide o ng-class o ng-view o ng-include o ng-repeat o ng-if o ng-switch
Watch video 9thmodule(AngularJS Modules: Modules and controllers in file, AngularJS Animation.) online without registration, duration hours minute second in high quality. This video was added by user Java Entertainment All 19 April 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 53 once and liked it 2 people.