Adding a Second View and Controller to Our Angular App

Now that we’ve installed and configured Angular’s router, we can add the detail view. In this section, we’ll set up some navigation from our existing search results view to the detail view, which will initially just be a bare-bones view to validate that the navigation and back end are working.

Our initial back end will just expose the data we already have and do so in a minimal way. We’re just trying to get navigation working, so we don’t want to get bogged down in UI design or complex back-end integrations—we’ll see that in the chapters to come.

To make our bare-bones view, we’ll need to do three things: add navigation to a new route that uses a new view and controller, design the bare-bones ...

Get Rails, Angular, Postgres, and Bootstrap now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.