function FirstCtrl($scope) { console.log($scope); } function SecondCtrl($scope) { console.log($scope); }
<div ng-app=""> <input type="text" ng-model="data.message"> <h1>{{ data.message }}</h1> <div ng-controller="FirstCtrl"> <input type="text" ng-model="data.message"> <h1>{{ data.message }}</h1> </div> <div ng-controller="SecondCtrl"> <input type="text" ng-model="data.message"> <h1>{{ data.message }}</h1> </div> <hr> <input type="text" ng-model="msg"> <h1>{{ msg }}</h1> <div ng-controller="FirstCtrl"> <input type="text" ng-model="msg"> <h1>{{ msg }}</h1> </div> <div ng-controller="SecondCtrl"> <input type="text" ng-model="msg"> <h1>{{ msg }}</h1> </div> </div>