O'Reilly logo

Learning Web Development with Bootstrap and AngularJS by Stephen Radford

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

Restructuring our project

Now we have our task runner set up, it's a great time to restructure our project to give us a more manageable codebase. We're going to separate out our controllers, directives, filters, and services into separate files to keep things tidy.

Let's start by working out a new directory structure as demonstrated here:

Restructuring our project

Here, we've moved everything out of our assets/js directory into its own app directory in the root. When we go to production, we're not going to want our source files to be deployed, so it's a good idea to break it out of the assets directory where our compressed files will live.

The new app directory has been structured ...

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