Anu Soosan Baby replied to the topic 'How to create a controller in Angular JS?' in the forum. 1 year ago

controller created within module.A module can contain any number of controllers.

<script>
var module_app=angular.module('myModule',[]);

module_app.controller('ctrl1',function($scope) {});
module_app.controller('ctrl2',function($scope){
//properties and logic come here
});
</script>

Read More...

Anu Soosan Baby replied to the topic 'How to create a Module in AngularJS?' in the forum. 1 year ago

module defines the application logic.It is created by using the angular.module function.

<script>
var app=angular.module("myModule",[]);
</script>

myModule is the module name.

Read More...