scope hierarchy in angularjs
The $scope object used by views in AngularJS are organized into a hierarchy. ... Each view has its own $scope (which is a child of the root scope), so whatever variables one view controller sets on its $scope variable, those variables are invisible to other controllers.