import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
import { authGuard } from 'src/modules/user/auth.guard';
const routes: Routes = [
  {
    path: '',
    loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
  },
  {

    path: 'user',
    loadChildren: () => import('../modules/user/user.module').then(m => m.UserModule)
  },
  {
    path: 'dongt',
    canActivate:[authGuard],
    loadChildren: () => import('../modules/dongt/dongt.module').then( m => m.DongtPageModule)
  },
  {
    path: 'favorites',
    canActivate:[authGuard],
    loadChildren: () => import('../modules/favorites/favorites.module').then( m => m.FavoritesPageModule)
  },
 
  {
    path: 'album',
    canActivate:[authGuard],
    loadChildren: () => import('../modules/album/album.module').then( m => m.AlbumPageModule)
  },

  

];
@NgModule({
  imports: [
    RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
  ],
  exports: [RouterModule]
})
export class AppRoutingModule {}

