import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { NavtabsPage } from './navtabs.page';

const routes: Routes = [
  {
    path: 'navtabsTab',
    component: NavtabsPage,
    children: [
      {
        path: 'home',
        loadChildren: () => import('../home/home.module').then( m => m.HomePageModule)
      },   
      {
        path: 'news',
        loadChildren: () => import('../news/news.module').then( m => m.NewsPageModule)
      },   
      {
        path: 'news-detail/:id',
        loadChildren: () => import('../news-detail/news-detail.module').then( m => m.NewsDetailPageModule)
      },
      {
        path: 'article',
        loadChildren: () => import('../article/article.module').then( m => m.ArticlePageModule)
      },   
      {
        path: 'youtube',
        loadChildren: () => import('../youtube/youtube.module').then( m => m.YoutubePageModule)
      }, 
      {
        path: '',
        redirectTo: '/navtabs/navtabsTab/home',
        pathMatch: 'full'
      }
    ]
  },
  {
    path: '',
    redirectTo: '/navtabs/navtabsTab/home',
    pathMatch: 'full'    
  }
];

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