title: How to display your 404 page?
body: <p>I have a page displaying error 404. But the page is opened only if the user entered an invalid url. And how to make it come out if the console displays such an error: "Failed to load resource: the server responded with a status of 404 (Not Found)". For example, if a remote user with id 86 then a blank page is displayed, and in console the error is 404. 
  And you need to do this so that instead of this blank page, my page with the 404 error is displayed.</p>
  
  <p>Who knows how to do this? Is there any example?</p>
  
  <pre><code>import { Routes, RouterModule }  from '@angular/router';
  
  import { ModuleWithProviders } from '@angular/core';
  
  import { AdministrationComponent } from '../pages/administration/administration.component';
  
  import { ProfileComponent } from '../pages/profile/profile.component';
  
  import { UsersComponent } from '../pages/users/users.component';
  import { UserShowComponent } from '../pages/users/user-show/user-show.component';
  
  import { NotFoundComponent } from '../not-found/not-found.component';
  
  import { LayoutComponent } from '../layout.component';
  
  
  export const routes: Routes   = [
      {
          path: 'layout',
          component: LayoutComponent,
          children: [
              { path: '', redirectTo: 'profile', pathMatch: 'full' },
              { path: 'administration',  component: AdministrationComponent},
              { path: 'profile',  component: ProfileComponent},
              { path: 'users',  component: UsersComponent},
              { path: 'users/:id',  component: UserShowComponent},
              { path: '**', component: NotFoundComponent }
  
          ]
      }
  ];
  
  export const routing: ModuleWithProviders = RouterModule.forChild(routes);
  </code></pre>