Routing (3.0.0+)

Download angular2 eBook

Remarks

There are a few more tricks we can do with the router (such as restricting access), but those can be covered in a separate tutorial.

If you need a new route, simply modify app.routes.ts and follow the following steps:

  1. Import the Component
  2. Add to the routes array. Make sure to include a new path and component.

Related Examples

Stats

751 Contributors: 12
Tuesday, August 1, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook