Download to read offline




![How to create a module
Syntax:
Var app = angular.module(“myModule”, []);](https://image.slidesharecdn.com/angularjsppt-170606113324/75/Modules-in-AngularJs-5-2048.jpg)
![How to add controller to Module:
var myApp=angular.module("myModule",[])
myApp.controller("myController",function($scope){ //Register the controller with the module.
});](https://image.slidesharecdn.com/angularjsppt-170606113324/75/Modules-in-AngularJs-6-2048.jpg)



Modules are containers that define an AngularJS application and hold parts like controllers, services, and directives. A module is used as the main entry point and starting point of an app. Controllers must belong to a module to avoid issues like global overriding. To create a module, use the angular.module method, passing in a name and empty array. Controllers can then be added to the module using the module's controller method.




![How to create a module
Syntax:
Var app = angular.module(“myModule”, []);](https://image.slidesharecdn.com/angularjsppt-170606113324/75/Modules-in-AngularJs-5-2048.jpg)
![How to add controller to Module:
var myApp=angular.module("myModule",[])
myApp.controller("myController",function($scope){ //Register the controller with the module.
});](https://image.slidesharecdn.com/angularjsppt-170606113324/75/Modules-in-AngularJs-6-2048.jpg)

