T

Table of Contents

    o create a not found page, we'll be using the wildcard catchall that the router provides.

    We can add the route after creating our new NotFoundComponent. In app.routing.ts, we'll add:

    const appRoutes: Routes = [
      { path: '', component: HomeComponent },
      { path: 'about', component: AboutComponent },
      { path: 'contact', component: ContactComponent },
      { path: '**', component: NotFoundComponent }
    ];

    Chris Sevilleja

    176 posts

    Founder of Scotch.io. Google Developer Expert in Web Technologies. Slapping the keyboard until something good happens.