Skip to content

Commit

Permalink
feat: fetch all module in pre-load stage
Browse files Browse the repository at this point in the history
  • Loading branch information
ElonH committed Jun 3, 2020
1 parent b554476 commit 8ea21ee
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/app/pages/pages-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { DashboardModule } from './dashboard/dashboard.module';
import { JobsModule } from './jobs/jobs.module';
import { ManagerModule } from './manager/manager.module';
import { PagesComponent } from './pages.component';
import { UserModule } from './user/user.module';

const routes: Routes = [
{
Expand All @@ -16,15 +19,18 @@ const routes: Routes = [
},
{
path: 'user',
loadChildren: () => import('./user/user.module').then(m => m.UserModule),
// loadChildren: () => import('./user/user.module').then(m => m.UserModule),
loadChildren: () => UserModule,
},
{
path: 'manager',
loadChildren: () => import('./manager/manager.module').then(m => m.ManagerModule),
// loadChildren: () => import('./manager/manager.module').then(m => m.ManagerModule),
loadChildren: () => ManagerModule,
},
{
path: 'jobs',
loadChildren: () => import('./jobs/jobs.module').then(m => m.JobsModule),
// loadChildren: () => import('./jobs/jobs.module').then(m => m.JobsModule),
loadChildren: () => JobsModule,
},
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' },
{ path: '**', redirectTo: 'dashboard' },
Expand Down

0 comments on commit 8ea21ee

Please sign in to comment.