Two Angular controllers on the same page



examples/try/two.html
<script src="../angular/angular.min.js"></script>
<script src="two.js"></script>

<div ng-app="DemoApp">
    <div ng-controller="OneController">
        {{name}} <input ng-model="title"> {{title}}
    </div>
    <div ng-controller="TwoController">
        {{name}} <input ng-model="title"> {{title}}
    </div>
</div>

examples/try/two.js
angular.module('DemoApp', [])
    .controller('OneController', ['$scope', function($scope) {
        $scope.name  = 'One';
    }])
    .controller('TwoController', ['$scope', function($scope) {
        $scope.name  = 'Two';
    }]);