Avoid 404 title on the first page load

This commit is contained in:
Chocobozzz 2018-06-28 17:16:22 +02:00
parent 1b952dd426
commit b889cdb2c6
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import { NgModule } from '@angular/core'
import { RouterModule, Routes } from '@angular/router'
import { PreloadSelectedModulesList } from './core'
import { AppComponent } from '@app/app.component'
const routes: Routes = [
{
@ -24,6 +25,10 @@ const routes: Routes = [
path: 'about',
loadChildren: './+about/about.module#AboutModule'
},
{
path: '',
component: AppComponent // Avoid 404, app component will redirect dynamically
},
{
path: '**',
loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule'