I am creating a angular module MyModule
. The module contains a number of sub-modules.
angular.module('MyModule', [
'MyModule.SubModule1',
'MyModule.SubModule2',
'MyModule.SubModule3'
]);
angular.module('MyModule.SubModule1', [
'MyModule.Util'
]);
As you can see, there is the module MyModule.Util
provides helper functions, which is actually written in a factory. No matter I explicit export MyModule.Util
or not, it will be exported along with all my modules.
But I want this MyModule.Util
only be used by sub-modules internally. Is that possible?