tabs.routes.ts 889 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { Routes } from '@angular/router';
  2. import { TabsPage } from './tabs.page';
  3. export const routes: Routes = [
  4. {
  5. path: 'tabs',
  6. component: TabsPage,
  7. children: [
  8. {
  9. path: 'tab1',
  10. loadComponent: () =>
  11. import('../tab1/tab1.page').then((m) => m.Tab1Page),
  12. },
  13. {
  14. path: 'tab2',
  15. loadComponent: () =>
  16. import('../tab2/tab2.page').then((m) => m.Tab2Page),
  17. },
  18. {
  19. path: 'tab3',
  20. loadComponent: () =>
  21. import('../tab3/tab3.page').then((m) => m.Tab3Page),
  22. },
  23. {
  24. path: 'tab4',
  25. loadComponent: () =>
  26. import('../tab4/tab4.page').then((m) => m.Tab4Page),
  27. },
  28. {
  29. path: '',
  30. redirectTo: '/tabs/tab1',
  31. pathMatch: 'full',
  32. },
  33. ],
  34. },
  35. {
  36. path: '',
  37. redirectTo: '/tabs/tab1',
  38. pathMatch: 'full',
  39. },
  40. ];