tabs-routing.module.ts 882 B

123456789101112131415161718192021222324252627282930313233343536373839
  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('../tab3/tab3.module').then(m => m.Tab3PageModule)
  20. },
  21. {
  22. path: '',
  23. redirectTo: '/tabs/tab1',
  24. pathMatch: 'full'
  25. }
  26. ]
  27. },
  28. {
  29. path: '',
  30. redirectTo: '/tabs/tab1',
  31. pathMatch: 'full'
  32. }
  33. ];
  34. @NgModule({
  35. imports: [RouterModule.forChild(routes)],
  36. })
  37. export class TabsPageRoutingModule {}