app-routing.module.ts 931 B

1234567891011121314151617181920212223242526272829303132333435
  1. import { NgModule } from '@angular/core';
  2. import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
  3. import { CropIntroPage } from './crop-intro/crop-intro.page';
  4. import { PestIntroPage } from './pest-intro/pest-intro.page';
  5. const routes: Routes = [
  6. {
  7. path: '',
  8. loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
  9. },
  10. {
  11. path: 'crop-intro',
  12. loadChildren: () => import('./crop-intro/crop-intro.module').then( m => m.CropIntroPageModule)
  13. },
  14. {
  15. path: 'pest-intro',
  16. loadChildren: () => import('./pest-intro/pest-intro.module').then( m => m.PestIntroPageModule)
  17. },
  18. {
  19. path: 'crop-intro',
  20. component: CropIntroPage
  21. },
  22. {
  23. path: 'pest-intro',
  24. component: PestIntroPage
  25. },
  26. ];
  27. @NgModule({
  28. imports: [
  29. RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
  30. ],
  31. exports: [RouterModule]
  32. })
  33. export class AppRoutingModule {}