app-routing.module.ts 743 B

12345678910111213141516171819202122232425
  1. import { NgModule } from '@angular/core';
  2. import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
  3. // import { UserInfoPage } from './user-info/user-info.page'; // 导入 UserInfoPage 组件
  4. const routes: Routes = [
  5. {
  6. path: 'user',
  7. loadChildren: () => import('../modules/user/user.module').then(m => m.UserModule)
  8. },
  9. {
  10. path: '',
  11. loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
  12. },
  13. {
  14. path: 'mine',
  15. loadChildren: () => import('./user-info/user-info.module').then( m => m.UserInfoPageModule)
  16. }
  17. ];
  18. @NgModule({
  19. imports: [
  20. RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
  21. ],
  22. exports: [RouterModule]
  23. })
  24. export class AppRoutingModule {}