import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { AppComponent } from './app.component'; import { HomeComponent } from './components/home/home.component'; import { PostsComponent } from './components/posts/posts.component'; import { CvComponent } from './components/cv/cv.component'; const appRoutes: Routes = [ // { path: 'crisis-center', component: CrisisListComponent }, { path: 'home', component: HomeComponent }, { path: 'posts', component: PostsComponent }, { path: 'cv', component: CvComponent }, { path: '', redirectTo: '/home', pathMatch: 'full' }, { path: '*', redirectTo: '/home', pathMatch: 'full' }, // { path: '**', component: AppComponent } ]; @NgModule({ imports: [ RouterModule.forRoot( appRoutes, { enableTracing: true } // <-- debugging purposes only ) ], exports: [ RouterModule ] }) export class AppRoutingModule {}