Angular Routing

Once you set up a new project using Angular CLI the first questions that appears in your command-line tool is if you would like to enable routing.

I’m just testing what it can do

Most of the new projects that you would run don’t need routing. If you build the projects just to test them locally you should pick ‘N’ (no).

When to enable routing?

The angular team says that once you want to use a couple of components and create a relation between them, then you should consider learning more about routing.

How to set up the router?

You can take one of the two approaches, but to understand how it works it is wise to work on an example.

The best source to learn more is the Angular Routing tutorial as they provide a great explanation with a step by step cmd/code examples.

You may also like...