import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { NewInvoiceComponent } from './new-invoice/new-invoice.component'; import { InvoicesComponent } from './invoices/invoices.component'; import { InvoicePaymentsComponent } from './invoice-payments/invoice-payments.component'; import { NewInvoicePaymentComponent } from './new-invoice-payment/new-invoice-payment.component'; const routes: Routes = [ { path: 'new-invoice', component: NewInvoiceComponent, data: { title: 'New Invoice' } }, { path: '', component: InvoicesComponent, data: { title: 'Invoices' } }, { path: 'payment-received', component: InvoicePaymentsComponent, data: { title: 'Payments Received' } }, { path: 'new-invoice-payment', component: NewInvoicePaymentComponent, data: { title: 'Invoice Payment' } } ]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] }) export class InvoiceRoutingModule {}