import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { PageNotFoundComponent } from './shared/components' ; const routes = [ { path : '' , redirectTo : 'home' , pathMatch : 'full' } , { path : '**' , component : PageNotFoundComponent } ] ; @ NgModule ( { imports : [ RouterModule . forRoot ( routes , { useHash : true } ) ] , exports : [ RouterModule ] } ) export class AppRoutingModule { }