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

const routes: Routes = [
  {
    path: 'home',
    loadChildren: () => import('./home/home.module').then( m => m.HomePageModule)
  },
  {
    path: '',
    redirectTo: 'home',
    pathMatch: 'full'
  },
  {
    path: 'story-details',
    loadChildren: () => import('./story-details/story-details.module').then( m => m.StoryDetailsPageModule)
  },
  {
    path: 'chant-mantras',
    loadChildren: () => import('./chant-mantras/chant-mantras.module').then( m => m.ChantMantrasPageModule)
  },
];

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