In AngularJS, is it possible to create private controllers or services which can be used within the module they are defined in, but not by another module they are injected into.
For example, can PrivateController be made private to the Child module:
angular.module('Child', [])
.controller('PublicController', function ($scope){
$scope.children = ['Bob', 'Sue'];
})
.controller('PrivateController',function ($scope){
$scope.redHeadedStepChildren = ['Billy', 'Mildred'];
})
angular.module('Parent', ['Child'])
<div ng-app="Parent">
<div ng-controller='PublicController'>
<div ng-repeat='child in children'>
{{child}}
</div>
</div>
<div ng-controller='PrivateController'>
<div ng-repeat='child in redHeadedStepChildren'>
{{child}}
</div>
</div>
</div>