var myApp = angular.module('myApp', []); myApp.controller('navCtrl', function ($scope) { $scope.user = {}; }); myApp.controller('loginCtrl', function ($scope) { }); //Recommendations: /* */
<div ng-controller="navCtrl"> <div>navCtrl text: {{user.name}}</div> <div ng-controller="loginCtrl"> <div> loginCtrl text: {{user.name}}</div> <br/> <input ng-model="user.name"></input> </div> </div>