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

Chapter 4. Routing

All web apps will require more than one page or view, and Angular is well-equipped to handle this with its router. You may be familiar with routing in server-side frameworks, such as Ruby on Rails or Laravel. Angular's is, of course, entirely on the client side and all the magic happens within the HTML file our browser is pointed to.

In this chapter, we'll take a look at how we can create static routes as well as routes containing parameters. We'll also discover some of the pitfalls you might face.

Before we begin, let's plan out exactly what routes we're going to need for our contacts manager:

  • Index: This is going to be our main page, which will list all of our contacts in a table
  • View Contact: Here, we'll be able to see the contact ...

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