O'Reilly logo

Mastering Web Application Development with AngularJS by Pawel Kozlowski, Peter Bacon Darwin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

AngularJS modules and files

Now that our application is nicely organized into folders and files we can start looking into content of the individual files. Here we are going to focus on JavaScript files, their content and relation to AngularJS modules.

One file, one module

In Chapter 1, Angular Zen, we've seen that AngularJS modules can depend on each other. This means that in the AngularJS application we need to deal with both directories hierarchy and modules hierarchy. Now we are going to dig more into those topics in order to come up with pragmatic recommendations for organizing AngularJS modules and their content.

There are basically three approaches we could take to relate individual files and AngularJS modules:

  • Allow multiple AngularJS modules ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required