title: Angular 6 routing
body: <p>I want to do a simple routing for error 404.
  If a link is corrupt, I want to redirect the user to page 404.
  My login page works fine, but I do not see where I'm wrong with the error page.
  This is my file <a href="https://i.stack.imgur.com/SJeOk.png" rel="nofollow noreferrer">structure</a>. And this is <a href="https://i.stack.imgur.com/pXYvz.png" rel="nofollow noreferrer">error</a> i get when try to load page.
  I you have some idea thi would be great!</p>
  
  <p><strong>app.module.ts</strong></p>
  
  <pre><code>import { NgModule } from '@angular/core';
  import { BrowserModule } from '@angular/platform-browser';
  import { HttpClientModule } from '@angular/common/http';
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
  import { RouterModule, Routes } from '@angular/router';
  import { TranslateModule } from '@ngx-translate/core';
  import 'hammerjs';
  
  import { FuseModule } from '@fuse/fuse.module';
  import { FuseSharedModule } from '@fuse/shared.module';
  
  import { fuseConfig } from './fuse-config';
  
  import { AppComponent } from './app.component';
  import { FuseMainModule } from './main/main.module';
  import { FuseSampleModule } from './main/content/sample/sample.module';
  import { Login2Module } from './main/content/login-2/login-2.module';
  import { Error404Module } from './main/content/errors/404/error404.module';
  
  const appRoutes: Routes = [
    {
      path: '',
      redirectTo: '/login',
      pathMatch: 'full'
    },
    {
      path: '**',
      redirectTo: '/errors/404/error404',
    }
  ];
  
  @NgModule({
    declarations: [
      AppComponent
    ],
    imports: [
      BrowserModule,
      BrowserAnimationsModule,
      HttpClientModule,
      RouterModule.forRoot(appRoutes),
      TranslateModule.forRoot(),
  
      // Fuse Main and Shared modules
      FuseModule.forRoot(fuseConfig),
      FuseSharedModule,
      FuseMainModule,
      FuseSampleModule,
      Login2Module,
      Error404Module
    ],
    bootstrap: [
      AppComponent
    ]
  })
  export class AppModule {
  }
  </code></pre>
  
  <p><strong>error.module.ts</strong></p>
  
  <pre><code>import { NgModule } from '@angular/core';
  import { RouterModule } from '@angular/router';
  
  import { MatIconModule } from '@angular/material';
  
  import { FuseSharedModule } from '@fuse/shared.module';
  
  import { FuseError404Component } from './error404.component';
  
  const routes = [
    {
      path: 'error404',
      component: FuseError404Component
    }
  ];
  
  @NgModule({
    declarations: [
      FuseError404Component
    ],
    imports: [
      RouterModule.forChild(routes),
  
      MatIconModule,
  
      FuseSharedModule
    ]
  })
  export class Error404Module {
  }
  </code></pre>