Chapter 3. Router basics

This chapter covers

  • Configuring parent and child routes
  • Passing data while navigating from one route to another
  • Configuring and using child routes

In a single-page application (SPA), the web page won’t be reloaded, but its parts may change. You’ll want to add navigation to this application so it’ll change the content area of the page (known as the router outlet) based on the user’s actions. The Angular router allows you to configure and implement such navigation without performing a full page reload.

In general, you can think of a router as an object responsible for the view state of the application. Every application has one router object, and you need to configure the routes of your app.

In this chapter, we’ll ...

Get Angular Development with TypeScript, Second Edition 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.