import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { IonicModule } from '@ionic/angular';
import { MineRoutingModule } from './mine-routing.module';
import { MineComponent } from './mine/mine.component';
import { ActivatedRoute, Router } from '@angular/router';


@NgModule({
  declarations: [
    MineComponent
  ],
  imports: [
    CommonModule, IonicModule,
    MineRoutingModule
  ]
})
export class MineModule {
  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])
  }
}
