Skip to content

Commit

Permalink
fix(dashboard-module): turn lazy-loading back to normal
Browse files Browse the repository at this point in the history
it cooperate with preloader
  • Loading branch information
ElonH committed May 27, 2020
1 parent 1251f2d commit aefbb8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/app/app-routing.module.ts
@@ -1,8 +1,10 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PagesModule } from './pages/pages.module';

const routes: Routes = [
{ path: 'pages', loadChildren: () => import('./pages/pages.module').then((m) => m.PagesModule) },
// { path: 'pages', loadChildren: () => import('./pages/pages.module').then((m) => m.PagesModule) },
{ path: 'pages', loadChildren: () => PagesModule },
{ path: '', redirectTo: 'pages', pathMatch: 'full' },
{ path: '**', redirectTo: 'pages' },
];
Expand Down
4 changes: 3 additions & 1 deletion src/app/pages/pages-routing.module.ts
Expand Up @@ -2,6 +2,7 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { PagesComponent } from './pages.component';
import { DashboardModule } from './dashboard/dashboard.module';

const routes: Routes = [
{
Expand All @@ -10,7 +11,8 @@ const routes: Routes = [
children: [
{
path: 'dashboard',
loadChildren: () => import('./dashboard/dashboard.module').then((m) => m.DashboardModule),
// loadChildren: () => import('./dashboard/dashboard.module').then((m) => m.DashboardModule),
loadChildren: () => DashboardModule,
},
{
path: 'user',
Expand Down

0 comments on commit aefbb8a

Please sign in to comment.