tabs.routes.ts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. import { TabsPage } from './tabs.page';
  2. import { NgModule } from '@angular/core';
  3. import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
  4. export const routes: Routes = [
  5. {
  6. path: 'tabs',
  7. component: TabsPage,
  8. children: [
  9. {
  10. path: 'tab1',
  11. loadComponent: () =>
  12. import('../tab1/tab1.page').then((m) => m.Tab1Page),
  13. },
  14. {
  15. path: 'tab2',
  16. loadComponent: () =>
  17. import('../tab2/tab2.page').then((m) => m.Tab2Page),
  18. },
  19. {
  20. path: 'tab3',
  21. loadComponent: () =>
  22. import('../tab3/tab3.page').then((m) => m.Tab3Page),
  23. },
  24. {
  25. path: 'tab4',
  26. loadComponent: () =>
  27. import('../tab4/tab4.page').then((m) => m.Tab4Page),
  28. },
  29. {
  30. path: 'picture',
  31. loadComponent: () =>
  32. import('../poem-picture/poem-picture.component').then((m) => m.PoemPictureComponent),
  33. },
  34. {
  35. path: 'inquiry/ai',
  36. loadComponent: () =>
  37. import('../page/page-inquiry/page-inquiry.component').then((m) => m.PageInquiryComponent),
  38. },
  39. {
  40. path: 'inquiry/human',
  41. loadComponent: () =>
  42. import('../page/inquiry-human/inquiry-human.component').then((m) => m.InquiryHumanComponent),
  43. },
  44. {
  45. path: 'page-test',
  46. loadComponent: () =>
  47. import('../page-test/page-test.component').then((m) => m.PageTestComponent),
  48. },
  49. {
  50. path: 'my-health', // 我的健康
  51. loadComponent: () =>
  52. import('../page/page-my-health/page-my-health.component').then((m) => m.PageMyHealthComponent),
  53. },
  54. {
  55. path: 'health-records', // 健康档案
  56. loadComponent: () =>
  57. import('../page/page-health-records/page-health-records.component').then((m) => m.PageHealthRecordsComponent),
  58. },
  59. {
  60. path: 'drug-purchase', // 药品购买
  61. loadComponent: () =>
  62. import('../page/page-drug-purchase/page-drug-purchase.component').then((m) => m.PageDrugPurchaseComponent),
  63. },
  64. {
  65. path: 'authority-experts', // 权威专家
  66. loadComponent: () =>
  67. import('../page/page-authority-experts/page-authority-experts.component').then((m) => m.PageAuthorityExpertsComponent),
  68. },
  69. {
  70. path: 'health-information', // 健康资讯
  71. loadComponent: () =>
  72. import('../page/page-health-information/page-health-information.component').then((m) => m.PageHealthInformationComponent),
  73. },
  74. {
  75. path: 'phone-inquiry', // 电话咨询
  76. loadComponent: () =>
  77. import('../page/page-phone-inquiry/page-phone-inquiry.component').then((m) => m.PagePhoneInquiryComponent),
  78. },
  79. {
  80. path: 'smart-community', // 智慧社区
  81. loadComponent: () =>
  82. import('../page/page-smart-community/page-smart-community.component').then((m) => m.PageSmartCommunityComponent),
  83. },
  84. {
  85. path: 'drug-category/:name',
  86. loadComponent: () =>
  87. import('../drug-category/drug-category.page').then(
  88. (m) => m.DrugCategoryPage
  89. ),
  90. },
  91. {
  92. path: '',
  93. redirectTo: '/tabs/tab3',
  94. pathMatch: 'full'
  95. },
  96. ],
  97. },
  98. {
  99. path: '',
  100. redirectTo: '/tabs/tab3',
  101. pathMatch: 'full'
  102. }
  103. ];
  104. @NgModule({
  105. imports: [
  106. RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
  107. ],
  108. exports: [RouterModule]
  109. })
  110. export class AppRoutingModule { }