homepage/src/app/app-routing.module.ts
2018-01-02 16:24:32 +01:00

30 lines
962 B
TypeScript

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 {}