import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { UserRoutingModule } from './user-routing.module';
import { PageLoginComponent } from './page-login/page-login.component';
import { PageRigistComponent } from './page-rigist/page-rigist.component';
import { PageUserComponent } from './page-user/page-user.component';
import { PageInfoComponent } from './page-info/page-info.component';
import { PageUserinfoComponent } from './page-userinfo/page-userinfo.component';
import { IonicModule } from '@ionic/angular';
import { FormsModule } from '@angular/forms';
import { PageUserDetailComponent } from './page-user-detail/page-user-detail.component';
import { ActivatedRoute, Router } from '@angular/router';


@NgModule({
  declarations: [
    PageLoginComponent,
    PageRigistComponent,
    PageUserComponent,
    PageInfoComponent,
    PageUserinfoComponent,
    PageUserDetailComponent,


  ],
  imports: [
    CommonModule,
    UserRoutingModule,
    FormsModule,
    IonicModule,
  ]
})
export class UserModule {
  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])
  }
}
