Browse Source

feat: update template according to new config modules

pull/4455/head
Arman Ozak 6 years ago
parent
commit
fcc571ccdf
  1. 23
      templates/app/angular/src/app/app-routing.module.ts
  2. 20
      templates/app/angular/src/app/app.module.ts

23
templates/app/angular/src/app/app-routing.module.ts

@ -5,33 +5,36 @@ import { RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{
path: '',
loadChildren: () => import('./home/home.module').then(m => m.HomeModule),
loadChildren: () => import('./home/home.module').then((m) => m.HomeModule),
data: {
routes: {
name: '::Menu:Home'
} as ABP.Route
}
name: '::Menu:Home',
} as ABP.Route,
},
},
{
path: 'account',
loadChildren: () => import('@abp/ng.account').then(m => m.AccountModule)
loadChildren: () =>
import('@abp/ng.account').then((m) => m.AccountModule.forLazy({ redirectUrl: '/' })),
},
{
path: 'identity',
loadChildren: () => import('@abp/ng.identity').then(m => m.IdentityModule)
loadChildren: () => import('@abp/ng.identity').then((m) => m.IdentityModule.forLazy()),
},
{
path: 'tenant-management',
loadChildren: () => import('@abp/ng.tenant-management').then(m => m.TenantManagementModule)
loadChildren: () =>
import('@abp/ng.tenant-management').then((m) => m.TenantManagementModule.forLazy()),
},
{
path: 'setting-management',
loadChildren: () => import('@abp/ng.setting-management').then(m => m.SettingManagementModule)
}
loadChildren: () =>
import('@abp/ng.setting-management').then((m) => m.SettingManagementModule.forLazy()),
},
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
exports: [RouterModule],
})
export class AppRoutingModule {}

20
templates/app/angular/src/app/app.module.ts

@ -1,8 +1,9 @@
import { AccountConfigModule } from '@abp/ng.account.config';
import { AccountConfigModule } from '@abp/ng.account/config';
import { CoreModule } from '@abp/ng.core';
import { IdentityConfigModule } from '@abp/ng.identity.config';
import { SettingManagementConfigModule } from '@abp/ng.setting-management.config';
import { TenantManagementConfigModule } from '@abp/ng.tenant-management.config';
import { IdentityConfigModule } from '@abp/ng.identity/config';
import { SettingManagementConfigModule } from '@abp/ng.setting-management/config';
import { TenantManagementConfigModule } from '@abp/ng.tenant-management/config';
import { ThemeBasicModule } from '@abp/ng.theme.basic';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
@ -12,7 +13,6 @@ import { NgxsModule } from '@ngxs/store';
import { environment } from '../environments/environment';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { SharedModule } from './shared/shared.module';
const LOGGERS = [NgxsLoggerPluginModule.forRoot({ disabled: false })];
@ -25,12 +25,12 @@ const LOGGERS = [NgxsLoggerPluginModule.forRoot({ disabled: false })];
environment,
}),
ThemeSharedModule.forRoot(),
AccountConfigModule.forRoot({ redirectUrl: '/' }),
IdentityConfigModule,
TenantManagementConfigModule,
SettingManagementConfigModule,
AccountConfigModule.forRoot(),
IdentityConfigModule.forRoot(),
TenantManagementConfigModule.forRoot(),
SettingManagementConfigModule.forRoot(),
NgxsModule.forRoot(),
SharedModule,
ThemeBasicModule.forRoot(),
...(environment.production ? [] : LOGGERS),
],
declarations: [AppComponent],

Loading…
Cancel
Save