app-routing.module.ts 655 B

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