I've been trying to optimise how I manage modules in a reasonable sized App and have come across a possible issue with dependencies.
As far as I can tell a module can access a service in another module even if there is no direct dependency.
Say we have an app
module that depends on two modules moduleA
and moduleB
. Is it correct that moduleB
should be able to access the dependencies of moduleA
? This is what appears to happen in the fiddle I set up - https://jsfiddle.net/neridum/jfdsjhjo/
To me this means that you could have the issue that if moduleA
was altered it could affect moduleB
even though the two are not dependencies.
I may have gone about it the wrong way or have misunderstood something. Or it could be a limitation of the Angular module system.
Edit: There is a similar module issue in Angular regarding the naming collision - "Namespacing" services in AngularJS I think this is a slightly different issue as in addition to the naming collision there is also the issue of modules being available when they perhaps shouldn't be.