I have a large angularjs application. It is structured in a module pattern like:
./
/search
search.js
/admin
/users
users.js
/settings
settings.js
admin.js
/edit
edit.js
/common
/components
/modal
modal.js
/services
auth.js
and so on. currently they are all under one angularjs 'module' e.g.:
var app = var app = angular.module('myapp', []);
and then in subsequent controllers/etc I do
app.controller('SearchCtrl', function(){ ... })
but as I look around the web at examples such as Angular CRUD Demo and ngBolierplate I find most of them split up each nested module(s) into their own 'module' rather than just strap it onto the main one.
Whats the best practice here? I've seen both but not sure which is the 'angular way'.