tabs.routes.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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: 'test',
  30. loadComponent: () =>
  31. import('../page-test/page-test.component').then((m) => m.PageTestComponent),
  32. },
  33. {
  34. path: 'evaluate',
  35. loadComponent: () =>
  36. import('../page-evaluate/page-evaluate.component').then((m) => m.PageEvaluateComponent),
  37. },
  38. {
  39. path: 'AIChat',
  40. loadComponent: () =>
  41. import('../page-ai-chat/page-ai-chat.component').then((m) => m.PageAiChatComponent),
  42. },
  43. {
  44. path: 'bmi',
  45. loadComponent: () =>
  46. import('../page-bmi/page-bmi.component').then((m) => m.PageBmiComponent),
  47. },
  48. {
  49. path: 'chat',
  50. loadComponent: () =>
  51. import('../ai-chat-component/ai-chat-component.component').then((m) => m.AiChatComponentComponent),
  52. },
  53. {
  54. path: '',
  55. redirectTo: '/tabs/tab1',
  56. pathMatch: 'full',
  57. },
  58. {
  59. path: '',
  60. redirectTo: '/tabs/tab1',
  61. pathMatch: 'full',
  62. },
  63. ],
  64. },
  65. {
  66. path: '',
  67. redirectTo: '/tabs/tab1',
  68. pathMatch: 'full',
  69. },
  70. ];