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.
This commit is contained in:
Cameron
2020-03-07 17:48:05 +00:00
parent 0aa0259316
commit f5b2f32225

View File

@@ -21,7 +21,7 @@ const appRoutes: Routes = [
{path: 'projects', component: ProjectsComponent, data: {state: 'project'}}, {path: 'projects', component: ProjectsComponent, data: {state: 'project'}},
{path: 'contact', component: ContactComponent, data: {state: 'contact'}}, {path: 'contact', component: ContactComponent, data: {state: 'contact'}},
{path: 'home', component: HomeComponent, data: {state: 'home'}}, {path: 'home', component: HomeComponent, data: {state: 'home'}},
{path: '', pathMatch: 'full', redirectTo: 'home'} {path: '**', pathMatch: 'full', redirectTo: 'home'}
]; ];
@NgModule({ @NgModule({
@@ -35,7 +35,7 @@ const appRoutes: Routes = [
ProjectKeywordPipe, ProjectKeywordPipe,
], ],
imports: [ imports: [
RouterModule.forRoot(appRoutes, {useHash: true}), RouterModule.forRoot(appRoutes),
BrowserModule, BrowserModule,
BrowserAnimationsModule, BrowserAnimationsModule,
MatToolbarModule, MatToolbarModule,