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 { EnvDetailPage } from './env-detail.page';
import {WtModule} from '../../components/wt/wt.module';
import {EnvHomePage} from '../env-home/env-home.page';
import {EnvShowerPage} from '../env-shower/env-shower.page';
import {EnvLightPage} from '../env-light/env-light.page';
import {EnvFanPage} from '../env-fan/env-fan.page';
import {EnvWaterchannelPage} from '../env-waterchannel/env-waterchannel.page';

const routes: Routes = [
  {
    path: '',
    component: EnvDetailPage,
          // children: [
          //     {path:'fan', component: EnvFanPage},
          //     {path:'shower', component: EnvShowerPage},
          //     {path:'light', component: EnvLightPage},
          //     {path:'waterchannel', component: EnvWaterchannelPage},
          //     {path: '', redirectTo: 'fan',pathMatch:'prefix'},
          // ]
  }
];

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
      WtModule, // for test
    RouterModule.forChild(routes)
  ],
  declarations: [
      EnvDetailPage,
      EnvWaterchannelPage,
      EnvLightPage,
      EnvFanPage,
      EnvShowerPage,
  ]
})
export class EnvDetailPageModule {}
