This chapter covers
- Making pretty URLs
- Adding multiple views to an SPA
- Going from one page to another without reloading the application
- Using AngularUI to get Twitter Bootstrap components as preconfigured Angular directives
In this chapter we’re continuing on with the work we started in chapter 9 by building a single-page application. By the end of this chapter the Loc8r application will be a single Angular application that uses our API to get the data.
Figure 10.1 shows where we’re at in the overall plan, still re-creating the main application as an Angular SPA.
Figure 10.1. This chapter continues the work we started in chapter 9 of re-creating the Loc8r application as an Angular SPA, moving the application logic from the back end to the front end.

We’ll start off by decoupling the Angular application from the server-side application—it’s still being incorporated into a Jade template. As part of this we’ll see how to make pretty URLs, removing the parameters in routes, and use prebuilt directives based on Twitter Bootstrap components. Along the way we’ll keep an eye on best practices, of course.