tabs.routes.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import { Routes } from '@angular/router';
  2. import { TabsPage } from './tabs.page';
  3. export const routes: Routes = [
  4. {
  5. path: 'tabs',
  6. component: TabsPage,
  7. children: [
  8. {
  9. path: 'tab1',
  10. loadComponent: () =>
  11. import('../tab1/tab1.page').then((m) => m.Tab1Page),
  12. },
  13. {
  14. path: 'tab2',
  15. loadComponent: () =>
  16. import('../tab2/tab2.page').then((m) => m.Tab2Page),
  17. },
  18. {
  19. path: 'tab3',
  20. loadComponent: () =>
  21. import('../tab3/tab3.page').then((m) => m.Tab3Page),
  22. },
  23. {
  24. path: 'edit',
  25. loadComponent: () =>
  26. import('../page-edit/page-edit.component').then((m) => m.PageEditComponent),
  27. },
  28. {
  29. path: 'tips',
  30. loadComponent: () =>
  31. import('../health-tips/health-tips.component').then((m) => m.HealthTipsComponent),
  32. },
  33. {
  34. path: 'asy',
  35. loadComponent: () =>
  36. import('../asy/asy.component').then((m) => m.AsyComponent),
  37. },
  38. {
  39. path: 'asf',
  40. loadComponent: () =>
  41. import('../asf/asf.component').then((m) => m.AsfComponent),
  42. },
  43. {
  44. path: 'asx',
  45. loadComponent: () =>
  46. import('../asx/asx.component').then((m) => m.AsxComponent),
  47. },
  48. {
  49. path: '',
  50. redirectTo: '/tabs/tab1',
  51. pathMatch: 'full',
  52. },
  53. ],
  54. },
  55. {
  56. path: '',
  57. redirectTo: '/tabs/tab1',
  58. pathMatch: 'full',
  59. },
  60. ];