I have two modules as follows.
var module1 = angular.module('myApp',['ngAnimate','ngTouch']
.controller('MainCtrl', function ($scope)){
});
var module2 = angular.module('myApp',[]);
module2.controller('NameCtrl',function($scope)){
});
And Html here
<body ng-app='myApp'>
<div ng-controller='MainCtrl'> //Code here</div>
<div ng-controller='NameCtrl'>//Code here</div>
</body>
But this throws error like this. 'NameCtrl' is not existing
Please let me know how to fix this. Thanks in advance