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 { PostulationsPage } from './postulations.page';

const routes: Routes = [
  {
        path: '',
        redirectTo: '/postulations/current',
        pathMatch: 'full'
  },
  {
    path: '',
    component: PostulationsPage,
    children: [
      {
        path: 'current',
        loadChildren: './current/current.module#CurrentPageModule'
      },
      {
        path: 'already',
        loadChildren: './already/already.module#AlreadyPageModule'
      },
      {
        path: 'ended',
        loadChildren: './ended/ended.module#EndedPageModule'
      }
    ]
  }
];

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    RouterModule.forChild(routes)
  ],
  declarations: [PostulationsPage]
})
export class PostulationsPageModule {}
