import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { DocapiListComponent } from './docapi-list/docapi-list.component' ; import { DocapiAddComponent } from './docapi-add/docapi-add.component' ; import { DocapiEditComponent } from './docapi-edit/docapi-edit.component' ; const routes = [ { path : '' , pathMatch : 'full' , data : { breadcrumb : 'List' } , component : DocapiListComponent } , { path : 'add' , data : { breadcrumb : 'Add' } , component : DocapiAddComponent } , { path : 'edit/:publicId' , data : { breadcrumb : 'Edit' } , component : DocapiEditComponent } ] ; @ NgModule ( { declarations : [ ] , imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] } ) export class DocapiRoutingModule { }