Objectives and outcomes

In this tutorial we are going to learn about angular modules. Modules in angular-js are used to seperate logic such services, controllers and custom directives from the code and to maintain the code clean.
We define modules in angular-js like show below:

var app = angular.module("app-name",[]);
app.controller("controller-name",function($scope)
{
	controller logic
	.
	.
	.
}



Module is declared using angular.module function. app-name will be same as we have declared in ng-app.