The Anatomy of an AngularJS App: Using Modules to Organize Code
In previous examples, I showed you how AngularJS uses dependency injection with factory functions when you create components such as controllers, filters, and services. Right at the start of the chapter, I explained that the second argument to the angular.module method, used to create modules, was an array of the module’s dependencies: … var myApp [ [ ...]