I have seen:

<pre>
var app = angular.module('app', [ 
'dependendcy1', 'dependendcy2', 'dependendcy3', 'dependendcy4' ]);
app.config(function() { ... });
app.service('whatever' function() { ... });
app.filter('whatever' function() { ... });
etc
</pre>

I have seen:

<pre>
angular.module('app', [ 
'dependendcy1', 'dependendcy2', 'dependendcy3', 'dependendcy4' ])
.config(function() { ... });

angular.module('app').service('whatever' function() { ... });
angular.module('app').filter('whatever' function() { ... });
</pre>


Are there advantages or disadvantages of either approach? In approach #1, 
does the "whatever" filter get all of those dependencies even though it 
doesn't need them? Or is this even an issue?

-- 
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.

Reply via email to