Demo application routing and navigation

We have come a long way in learning all about the Angular router. We have seen various tips and tricks of how to use the router module. It's now fun time as we put together all the pieces we have learned so far into a neat, clean application.

The following image shows our final application filesystem structure :

We will add the main navigation menu and some basic styling to jazz up our application in the app.component.ts file:

import { Component, ViewEncapsulation } from '@angular/core';@Component({ selector: 'my-app', template: `    <h2>Angular2 Routing and Navigation</h2>    <div class="">    <p> <a routerLink="/about" ...

Get Expert Angular 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.