Recall the method signature for angular.module. If the second parameter, requires
is provided, then we are creating a new module instead of retrieving an existi
requires meaning an array of modules which your module depends.
example:
moduleA.js
var customModule = angular.module ('ModuleA');
// controller, services, factories , etc codes here
app.js (main app)
var app = angular.module ("app", ["ModuleA"]);
if I just use:
angular.module ("app");
It means that i'm just retrieving the module named "app". Which is useable when controllers or directives or factories is defined in a different JS files and you want to configure it to the module "app"