import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { Routes, RouterModule } from '@angular/router'; import { HomeComponent } from './home/home.component'; import { DetailsComponent } from './details/details.component'; import { IonicModule } from '@ionic/angular'; import { MyTeamPage } from './my-team.page'; import { HmgCommonModule } from '../hmg-common/hmg-common.module'; const routes: Routes = [ { path: '', component: MyTeamPage, children:[{ path: 'home', component: HomeComponent }, { path: 'details', component: DetailsComponent }, { path: 'details-2', component: DetailsComponent } ] } ]; @NgModule({ imports: [ HmgCommonModule, CommonModule, FormsModule, IonicModule, RouterModule.forChild(routes) ], declarations: [MyTeamPage,HomeComponent,DetailsComponent] }) export class MyTeamPageModule {}