tabs.routes.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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: '',
  25. redirectTo: '/tabs/tab1',
  26. pathMatch: 'full',
  27. },
  28. {
  29. path: 'AIChat',
  30. loadComponent: () =>
  31. import('../page-ai-chat/page-ai-chat.component').then((m) => m.PageAiChatComponent),
  32. },
  33. {
  34. path: 'bmi',
  35. loadComponent: () =>
  36. import('../page-bmi/page-bmi.component').then((m) => m.PageBmiComponent),
  37. },
  38. {
  39. path: 'test',
  40. loadComponent: () =>
  41. import('../page-test/page-test.component').then((m) => m.PageBodyFatComponent),
  42. },
  43. {
  44. path: 'ytb',
  45. loadComponent: () =>
  46. import('../page-ytb/page-ytb.component').then((m) => m.PageYtbComponent),
  47. },
  48. {
  49. path: 'news',
  50. loadComponent: () =>
  51. import('../page-news/page-news.component').then((m) => m.PageNewsComponent),
  52. },
  53. {
  54. path: 'teach',
  55. loadComponent: () =>
  56. import('../page-teach/page-teach.component').then((m) => m.PageteachComponent),
  57. },
  58. {
  59. path: 'skill',
  60. loadComponent: () =>
  61. import('../page-skill/page-skill.component').then((m) => m.PageskillComponent),
  62. },
  63. {
  64. path: '',
  65. redirectTo: '/tabs/tab1',
  66. pathMatch: 'full',
  67. },
  68. {
  69. path: '',
  70. redirectTo: '/tabs/tab1',
  71. pathMatch: 'full',
  72. },
  73. ],
  74. },
  75. {
  76. path: '',
  77. redirectTo: '/tabs/tab1',
  78. pathMatch: 'full',
  79. },
  80. ];