Angular routing

We are about to implement two routes to see routing in action. The first route is our main page, which shows the Welcome screen. The second page shows the About screen. We are also going to need some links or buttons to switch between the two pages.

Since the Angular CLI provides the ng generate component command, which creates a new component scaffold with all the necessary files and project modifications, let's generate an About page first:

  1. Run the following command:
      ng generate component about

Pay attention to the command's output. As a result, you get a Typescript file with the component; a spec.ts file, which contains a unit testing placeholder; and an HTML template, which contains the SCSS stylesheet. The Angular ...

Get Electron Projects 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.