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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user