O'Reilly logo

Rails, Angular, Postgres, and Bootstrap, 2nd Edition by David B. Copeland

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

Navigating the User Interface Client-Side

With the router and our routes configured, we need to implement the navigation. We want to be able to do two things with what we’ve set up. First, we need to add a button to each search result that, when clicked, navigates from /customers/ng to /customers/ng/«customer id». Second, we need to extract that customer ID from the URL so we know which customer’s details we want to view.

Add Navigation to the Detail View

In Respond to Click Events, you saw how to respond to click events. What we want to do here is exactly the same thing. First, let’s add a button to each search result that the user will use to view a single customer’s details. We’ll add it to the bottom right of our search result using Bootstrap’s ...

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