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