mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Add preloadingStrategy PreloadAllModules
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { RouterModule, Routes, PreloadAllModules } from '@angular/router';
|
||||
import { LogInComponent } from './components/log-in/log-in.component';
|
||||
import { DashboardComponent } from './modules/dashboard/pages/dashboard.component';
|
||||
|
||||
@@ -8,22 +8,43 @@ const routes: Routes = [
|
||||
path: 'login',
|
||||
children: [
|
||||
{ path: '', component: LogInComponent, pathMatch: 'full' },
|
||||
{ path: ':token', component: LogInComponent }
|
||||
]
|
||||
{ path: ':token', component: LogInComponent },
|
||||
],
|
||||
},
|
||||
{ path: 'dashboard', component: DashboardComponent },
|
||||
{ path: 'product', loadChildren: './modules/product/product.module#ProductModule' },
|
||||
{ path: 'customer', loadChildren: './modules/customer/customer.module#CustomerModule' },
|
||||
{ path: 'branch', loadChildren: './modules/branch/branch.module#BranchModule' },
|
||||
{
|
||||
path: 'product',
|
||||
loadChildren: './modules/product/product.module#ProductModule',
|
||||
},
|
||||
{
|
||||
path: 'customer',
|
||||
loadChildren: './modules/customer/customer.module#CustomerModule',
|
||||
},
|
||||
{
|
||||
path: 'branch',
|
||||
loadChildren: './modules/branch/branch.module#BranchModule',
|
||||
},
|
||||
{ path: 'shelf', loadChildren: './modules/shelf/shelf.module#ShelfModule' },
|
||||
{ path: 'cart', loadChildren: './modules/cart/cart.module#CartModule' },
|
||||
{ path: 'debug', loadChildren: './modules/debug/debug.module#DebugModule' },
|
||||
{ path: 'goodsin', loadChildren: './modules/goods-in/goods-in.module#GoodsInModule' },
|
||||
{ path: 'remission', loadChildren: './modules/remission/remission-client.module#RemissionClientModule' }
|
||||
{
|
||||
path: 'goodsin',
|
||||
loadChildren: './modules/goods-in/goods-in.module#GoodsInModule',
|
||||
},
|
||||
{
|
||||
path: 'remission',
|
||||
loadChildren:
|
||||
'./modules/remission/remission-client.module#RemissionClientModule',
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes, { scrollPositionRestoration: 'enabled' })],
|
||||
exports: [RouterModule]
|
||||
imports: [
|
||||
RouterModule.forRoot(routes, {
|
||||
preloadingStrategy: PreloadAllModules,
|
||||
scrollPositionRestoration: 'enabled',
|
||||
}),
|
||||
],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class AppRoutingModule {}
|
||||
|
||||
Reference in New Issue
Block a user