tabs-routing.module.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import { NgModule } from '@angular/core';
  2. import { RouterModule, Routes } from '@angular/router';
  3. import { TabsPage } from './tabs.page';
  4. const routes: Routes = [
  5. {
  6. path: 'tabs',
  7. component: TabsPage,
  8. children: [
  9. {
  10. path: 'tab1',
  11. loadChildren: () => import('../tab1/tab1.module').then(m => m.Tab1PageModule)
  12. },
  13. {
  14. path: 'tab2',
  15. loadChildren: () => import('../tab2/tab2.module').then(m => m.Tab2PageModule)
  16. },
  17. {
  18. path: 'tab3',
  19. loadChildren: () => import('../../modules/user/mine/mine.module').then(mod => mod.MinePageModule)
  20. },
  21. {
  22. path: 'tab4',
  23. loadChildren: () => import('../../modules/contact/contact-list/contact-list.module').then(mod => mod.ContactListPageModule)
  24. },
  25. {
  26. path: '',
  27. redirectTo: '/tabs/tab1',
  28. pathMatch: 'full'
  29. }
  30. ]
  31. },
  32. {
  33. path: '',
  34. redirectTo: '/tabs/tab1',
  35. pathMatch: 'full'
  36. }
  37. ];
  38. @NgModule({
  39. imports: [RouterModule.forChild(routes)],
  40. })
  41. export class TabsPageRoutingModule {}