import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { IonicModule } from '@ionic/angular';
import { HomePageRoutingModule } from './home-page-routing.module';
import { HomePageComponent } from './home-page/home-page.component';
import { ActivatedRoute, Router } from '@angular/router';
import { HomeDetailComponent } from './home-detail/home-detail.component';


@NgModule({
  declarations: [
    HomePageComponent,
    HomeDetailComponent
  ],
  imports: [
    CommonModule, IonicModule,
    HomePageRoutingModule
  ]
})
export class HomePageModule {
    path = ""
  constructor(private route: ActivatedRoute, private router: Router) {
    this.route.queryParams.subscribe(params => {
      this.path = location.pathname;
    })
  }
  goTab(path: string) {
    this.path = path;
    this.router.navigate([path])
  }
}
