import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { Routes, RouterModule } from '@angular/router'; import { IonicModule } from '@ionic/angular'; import { ItemforsalePage } from './itemforsale.page'; import { HomeComponent } from './home/home.component'; import { ItemsComponent } from './items/items.component'; import { ItemDetailsComponent } from './item-details/item-details.component'; import { MyAdsComponent } from './my-ads/my-ads.component'; import { HmgCommonModule } from '../hmg-common/hmg-common.module'; const routes: Routes = [ { path: '', component: ItemforsalePage, children: [ { path: 'home', component: HomeComponent }, { path: 'items', component: ItemsComponent }, { path: 'items-details', component: ItemDetailsComponent }, { path: 'my-ads', component: MyAdsComponent } ], } ]; @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, HmgCommonModule, RouterModule.forChild(routes) ], declarations: [ItemforsalePage, HomeComponent, ItemsComponent, ItemDetailsComponent, MyAdsComponent] }) export class ItemforsalePageModule { }