app-routing.module.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import { NgModule } from '@angular/core';
  2. import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
  3. // 引用路由守卫
  4. import { authGuard } from 'src/modules/user/auth.guard';
  5. const routes: Routes = [
  6. {
  7. path: '',
  8. loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
  9. },
  10. {
  11. path: 'tab4',
  12. loadChildren: () => import('./tab4/tab4.module').then( m => m.Tab4PageModule)
  13. },
  14. {
  15. path: 'feedback',
  16. loadChildren: () => import('./feedback/feedback.module').then( m => m.FeedbackPageModule)
  17. },
  18. {
  19. path: 'settings',
  20. loadChildren: () => import('./settings/settings.module').then( m => m.SettingsPageModule)
  21. },
  22. // {
  23. // path: 'login',
  24. // loadChildren: () => import('./login/login.module').then( m => m.LoginPageModule)
  25. // },
  26. {
  27. path: 'edit-profile',
  28. loadChildren: () => import('./edit-profile/edit-profile.module').then( m => m.EditProfilePageModule)
  29. },
  30. {
  31. path: 'notification-settings',
  32. loadChildren: () => import('./notification-settings/notification-settings.module').then( m => m.NotificationSettingsPageModule)
  33. },
  34. {
  35. path: 'privacy',
  36. loadChildren: () => import('./privacy/privacy.module').then( m => m.PrivacyPageModule)
  37. },
  38. {
  39. path: 'theme-settings',
  40. loadChildren: () => import('./theme-settings/theme-settings.module').then( m => m.ThemeSettingsPageModule)
  41. },
  42. {
  43. path: 'language-settings',
  44. loadChildren: () => import('./language-settings/language-settings.module').then( m => m.LanguageSettingsPageModule)
  45. },
  46.   // 添加:
  47.     {
  48.       path: 'user',
  49.       loadChildren: () => import('../modules/user/user.module').then(m => m.UserModule)
  50.     },
  51. {
  52. path: 'following',
  53. loadChildren: () => import('./following/following.module').then( m => m.FollowingPageModule)
  54. },
  55. {
  56. path: 'follower',
  57. loadChildren: () => import('./follower/follower.module').then( m => m.FollowerPageModule)
  58. }, {
  59. path: 'creator',
  60. loadChildren: () => import('./creator/creator.module').then( m => m.CreatorPageModule)
  61. },
  62. {
  63. path: 'aichat',
  64. loadChildren: () => import('./aichat/aichat.module').then( m => m.AIChatPageModule)
  65. },
  66. {
  67. path: 'consult',
  68. loadChildren: () => import('./consult/consult.module').then( m => m.ConsultPageModule)
  69. }
  70. ];
  71. @NgModule({
  72. imports: [
  73. RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
  74. ],
  75. exports: [RouterModule]
  76. })
  77. export class AppRoutingModule {}