Component-Based Routing

Routing is an integral part of today's frontend applications. In general, a router serves three main purposes:

  • It makes your application navigable so that users can use their browser's back button and store and share links within the application
  • It offloads parts of the application composition so that the router takes responsibility for composing your application, based on routes and route parameters
  • It stores part of your application state within the URL of your browser

The router that comes with Angular supports many different use-cases, and it comes with an easy-to-use API. It supports child routes that are similar to the Angular UI-Router nested states, Ember.js nested routes or child routers in the Durandal ...

Get Mastering Angular Components 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.