import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { Routes, RouterModule } from '@angular/router'; import { HmgCommonModule } from 'src/app/hmg-common/hmg-common.module'; import { IonicModule } from '@ionic/angular'; import {EarningsComponent}from './earnings/earnings.component' import {DeductionsComponent} from './deductions/deductions.component' import { PayslipPage } from './payslip.page'; import {HomeComponent} from './home/home.component' const routes: Routes = [ { path: '', component: PayslipPage, children: [ { path: 'home', component: HomeComponent }, { path: 'Deductions', component: DeductionsComponent }, { path: 'Earnings', component: EarningsComponent }, ] } ]; @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, HmgCommonModule, RouterModule.forChild(routes) ], providers:[ HomeComponent, EarningsComponent, DeductionsComponent ], declarations: [PayslipPage,HomeComponent,EarningsComponent,DeductionsComponent] }) export class PayslipPageModule {}