From f5b2f32225a3d295b0edeb771f34ae1f35f566c1 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 7 Mar 2020 17:48:05 +0000 Subject: [PATCH] Fix routing of empty or unknown routes Also we don't need to put the hash symbol before the routes, not sure why that got set. --- src/app/app.module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index e539fbf..7d30e9b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -21,7 +21,7 @@ const appRoutes: Routes = [ {path: 'projects', component: ProjectsComponent, data: {state: 'project'}}, {path: 'contact', component: ContactComponent, data: {state: 'contact'}}, {path: 'home', component: HomeComponent, data: {state: 'home'}}, - {path: '', pathMatch: 'full', redirectTo: 'home'} + {path: '**', pathMatch: 'full', redirectTo: 'home'} ]; @NgModule({ @@ -35,7 +35,7 @@ const appRoutes: Routes = [ ProjectKeywordPipe, ], imports: [ - RouterModule.forRoot(appRoutes, {useHash: true}), + RouterModule.forRoot(appRoutes), BrowserModule, BrowserAnimationsModule, MatToolbarModule,