Only one module (ng-app= "") can be in Angularjs, and one module may have multiple controllers (ng-controller= "")
In their own experiment, JS and the page can be written in a piece, but large-scale project development, it is best to do HTML and JS separation, easy to maintain later.
Shown: Ng-app can only have one, multiple controllers in one ng-app, and no meaning when defining multiple Ng-app.
Run as follows:
<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD">"http://www.w3.org/1999/xhtml">"Http://apps.bdimg.com/libs/angular.js/1.2.15/angular.min.js"></script> <script>MyApp1= Angular.module ('MyApp1', []); Myapp1.controller ('Mycon1', Function ($scope) {$scope. NUM1=0; $scope. Click1=function () {$scope. NUM1+=1; }; }); Myapp1.controller ('Mycon2', Function ($scope) {$scope. num2=0; $scope. Click2=function () {$scope. num2+=1; }; }); MYAPP3= Angular.module ('MYAPP3', []); Myapp3.controller ('Mycon3', Function ($scope) {$scope. num3=0; $scope. Click3=function () {$scope. num3+=1; }; }); </script>"MyApp1"> <div ng-controller="Mycon1"> <input type="Button"Value="+1"ng-click="Click1 ()"/> <p>{{num1}}</p> </div> <div ng-controller="Mycon2"> <input type="Button"Value="+1"ng-click="Click2 ()"/> <p>{{num2}}</p> </div> </div> <div ng-app="MYAPP3"> <div ng-controller="Mycon3"> <input type="Button"Value="+1"ng-click="Click3 ()"/> <p>{{num3}}</p> </div> </div></body>ANGULARJS modules and controllers (multiple modules module?? Multiple controller controllers?? )