Hi Ashwin,
As often there is no definitive answer to your question, besides: it
depends ;)
I like to think that (sub)modules are there to arrange (sub)systems. A
single directive is seldom an entire (sub)system. In most apps I have an
module Common where I put the directive’s/services/stuff that’s common to
the whole application. A module Utils is ussually also there (Utils are
things so common that I can reuse them in more then 1 app). The module
utils has it’s own sub-modules.
as an example:
angular
.module('utilsWebsocket',[])
.service('utilsWebSocketService',...);
angular
.module('utilsDate',[])
.service('dateTools',...);
angular
.module('utils', [
'utilsWebsocket',
'utilsDate'
]);
angular
.module('app', ['utils','common']);
Every module is in its own (set of) file(s).
Does this help you enough?
Regards
Sander
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.