import { NgModule } from '@angular/core' ; import { RouterModule , Routes } from '@angular/router' ; import { EmployeesComponent } from './employees/employees.component' ; import { PageNotFoundComponent } from './page-not-found/page-not-found.component' ; import { ProjectComponent } from './projects/project.component' ; const routes = [ { path : 'employees' , component : EmployeesComponent } , { path : 'projects' , component : ProjectComponent } , { path : '' , redirectTo : '/employees' , pathMatch : 'full' } , { path : '**' , component : PageNotFoundComponent } ] ; @ NgModule ( { imports : [ RouterModule . forRoot ( routes ) ] , exports : [ RouterModule ] } ) export class AppRoutingModule { }