# AngularJs - modules
ref angular.module
recommandations :
# angular.module === namespace ?
NO
- This AngularJS modules/dependencies thing is a lie
- Hack for target a precise component in a precise module (encapsulate the service u want with another service who call a new injector set to the right module only)
- angular repo issue discussion
# so how it works ?
- modules are ref to components for the injector.
- the injector index is flat, it means that any component from any module registered in the injector is available to injection in everyone.
- modules cannot avoid name collision. So components names must be uniques.
- there is no error risen when 2 components with the same name are registered to the injector. The last one is kept.