app-routing.module.ts 799 B

12345678910111213141516171819202122232425262728
  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: 'new-page',
  10. loadChildren: () => import('./new-page/new-page.module').then( m => m.NewPagePageModule)
  11. }, {
  12. path: 'login',
  13. loadChildren: () => import('./login/login.module').then( m => m.LoginPageModule)
  14. },
  15. {
  16. path: 'register',
  17. loadChildren: () => import('./register/register.module').then( m => m.RegisterPageModule)
  18. }
  19. ];
  20. @NgModule({
  21. imports: [
  22. RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
  23. ],
  24. exports: [RouterModule]
  25. })
  26. export class AppRoutingModule {}