tabs.routes.ts 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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: 'chat',
  50. loadComponent: () =>
  51. import('../ai-chat-component/ai-chat-component.component').then((m) => m.AiChatComponentComponent),
  52. },
  53. {
  54. path: 'news',
  55. loadComponent: () =>
  56. import('../page-news/page-news.component').then((m) => m.PageNewsComponent),
  57. },
  58. {
  59. path: '',
  60. redirectTo: '/tabs/tab1',
  61. pathMatch: 'full',
  62. },
  63. {
  64. path: '',
  65. redirectTo: '/tabs/tab1',
  66. pathMatch: 'full',
  67. },
  68. ],
  69. },
  70. {
  71. path: '',
  72. redirectTo: '/tabs/tab1',
  73. pathMatch: 'full',
  74. },
  75. ];