Details

It is important for modules to have their own unique namespace so as to not conflict with existing modules in Angular or external libraries that may be used. Specifically, a module should be named with lowerCamelCase. Moreover, all modules in an application should be prefixed with a consistent prefix, as in the Angular ng prefix. For example, a travel application could have the prefix ta to stand for 'travel application'. This special prefix would ensure that the modules created for this application would have different names, and hence namespaces, as compared to other third party components.

For instance, say we create a module calendar for this travel application:

angular.module('calendar').
  directive('myComponent', function() { ... };
});

Later, we decide to use a third party module that happens to contain a different module called calendar in addition to the functionality that we would like to use:

angular.module('calendar').
  directive('thirdPartyComponent', function() { ... };
});

These modules would overwrite each other. However, if we name our own modules with our namespace best practice, we avoid this issue:

angular.module('taCalendar').
  directive('myComponent', function() { ... };
});

AngularHintModules provides a warning if modules are not named with lowerCamelCase.