In the angular-seed-project the filters, services, and directives are placed in different modules. Why? Why not stick them all under the myApp module?
angular.module('myApp', ['myApp.filters', 'myApp.services', 'myApp.directives'])
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Quoting from [1]
“…we recommend that you break your application to multiple modules like this:
directive declaration
which has initialization code.
The reason for this breakup is that in your tests, it is often necessary to ignore the initialization code, which tends to be difficult to test. By putting it into a separate module it can be easily ignored in tests. The tests can also be more focused by only loading the modules that are relevant to tests.
The above is only a suggestion, so feel free to tailor it to your needs.”
[1] http://docs.angularjs.org/guide/module