import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { LoginGuard } from '../guards/login.guard';
import { IndexPage } from './index.page';

const routes: Routes = [
  {
    path: '',
    component: IndexPage,
    /* canActivate: [IndexGuard], */
    children: [
      /*{ 
        path: '',
        loadChildren: ()=> import('../pages/welcome/welcome.module').then(m => m.WelcomePageModule)
      }, */
      {
        path: '',
        loadChildren: ()=> import('../pages/login/login.module').then(m => m.LoginPageModule),
        canActivate: [LoginGuard]
      },
    ]
  }
];

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