import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { TabsPage } from './tabs.page';

const routes: Routes = [
  {
    path: 'tabs',
    component: TabsPage,
    children: [
      {path: 'home', children: [{path: '', loadChildren: './home/home.module#HomePageModule'}]},
      {path: 'discover', children: [{path: '', loadChildren: './discover/discover.module#DiscoverPageModule'}]},
      {path: 'serve', children: [{path: '', loadChildren: './serve/serve.module#ServePageModule'}]},
      {path: 'mine', children: [{path: '', loadChildren: './mine/mine.module#MinePageModule'}]},
      {path: '', redirectTo: '/tabs/home', pathMatch: 'full'}
    ]
  },
  {
    path: '',
    redirectTo: '/tabs/home',
    pathMatch: 'full'
  }
];

@NgModule({
  imports: [
    RouterModule.forChild(routes)
  ],
  exports: [RouterModule]
})
export class TabsPageRoutingModule {}
