Chapter 3. Navigation with the Angular router

This chapter covers

  • Configuring routes
  • Passing data while navigating from one route to another
  • Having more than one area for navigation (a.k.a. outlet) on the same page using auxiliary routes
  • Lazy-loading modules with the router

In chapter 2, you built the home page of the online auction with the intent to create a single-page application (SPA): the main page won’t be reloaded, but its parts may change. You now want to add navigation to this application so it’ll change the content area of the page (we’ll define that a bit later) based on the user’s actions. Imagine that the user needs to be able to see product details, bid on products, and chat with sellers. The Angular router allows you to ...

Get Angular 2 Development with TypeScript 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.