Browse Source

feat: define DynamicLayoutComponent in root level

pull/4423/head
mehmet-erim 6 years ago
parent
commit
e88d5b4cba
  1. 55
      npm/ng-packs/apps/dev-app/src/app/app-routing.module.ts

55
npm/ng-packs/apps/dev-app/src/app/app-routing.module.ts

@ -1,36 +1,37 @@
import { ABP } from '@abp/ng.core'; import { ABP, DynamicLayoutComponent } from '@abp/ng.core';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
const routes: Routes = [ const routes: Routes = [
{ {
path: '', path: '',
loadChildren: () => import('./home/home.module').then(m => m.HomeModule), component: DynamicLayoutComponent,
data: { children: [
routes: { {
name: '::Menu:Home', path: '',
order: 1, pathMatch: 'full',
} as ABP.Route, loadChildren: () => import('./home/home.module').then(m => m.HomeModule),
}, },
}, {
{ path: 'account',
path: 'account', loadChildren: () =>
loadChildren: () => import('@abp/ng.account').then(m => m.AccountModule.forLazy({ redirectUrl: '/' })),
import('@abp/ng.account').then(m => m.AccountModule.forLazy({ redirectUrl: '/' })), },
}, {
{ path: 'identity',
path: 'identity', loadChildren: () => import('@abp/ng.identity').then(m => m.IdentityModule.forLazy()),
loadChildren: () => import('@abp/ng.identity').then(m => m.IdentityModule.forLazy()), },
}, {
{ path: 'tenant-management',
path: 'tenant-management', loadChildren: () =>
loadChildren: () => import('@abp/ng.tenant-management').then(m => m.TenantManagementModule.forLazy()),
import('@abp/ng.tenant-management').then(m => m.TenantManagementModule.forLazy()), },
}, {
{ path: 'setting-management',
path: 'setting-management', loadChildren: () =>
loadChildren: () => import('@abp/ng.setting-management').then(m => m.SettingManagementModule.forLazy()),
import('@abp/ng.setting-management').then(m => m.SettingManagementModule.forLazy()), },
],
}, },
]; ];

Loading…
Cancel
Save