Browse Source

setting management module standalone migration

migrating-abp-packages/setting-management
erdemcaygor 9 months ago
parent
commit
3eee2330a9
  1. 3
      npm/ng-packs/apps/dev-app/src/app/app-routing.module.ts
  2. 7
      npm/ng-packs/packages/setting-management/src/lib/components/setting-management.component.ts
  3. 11
      npm/ng-packs/packages/setting-management/src/lib/setting-management.module.ts
  4. 33
      npm/ng-packs/packages/setting-management/src/lib/setting-management.routes.ts
  5. 3
      npm/ng-packs/packages/setting-management/src/lib/setting-management.ts
  6. 1
      npm/ng-packs/packages/setting-management/src/public-api.ts

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

@ -21,8 +21,7 @@ const routes: Routes = [
},
{
path: 'setting-management',
loadChildren: () =>
import('@abp/ng.setting-management').then(m => m.SettingManagementModule.forLazy()),
loadChildren: () => import('@abp/ng.setting-management').then(m => m.settingManagementRoutes),
},
];

7
npm/ng-packs/packages/setting-management/src/lib/components/setting-management.component.ts

@ -1,12 +1,15 @@
import { ABP } from '@abp/ng.core';
import { ABP, CoreModule } from '@abp/ng.core';
import { SettingTabsService } from '@abp/ng.setting-management/config';
import { Component, OnDestroy, OnInit, TrackByFunction } from '@angular/core';
import { Subscription } from 'rxjs';
import { CommonModule } from '@angular/common';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { PageModule } from '@abp/ng.components/page';
@Component({
standalone: false,
selector: 'abp-setting-management',
templateUrl: './setting-management.component.html',
imports: [CommonModule, CoreModule, ThemeSharedModule, PageModule],
})
export class SettingManagementComponent implements OnDestroy, OnInit {
private subscription = new Subscription();

11
npm/ng-packs/packages/setting-management/src/lib/setting-management.module.ts

@ -1,14 +1,11 @@
import { PageModule } from '@abp/ng.components/page';
import { CoreModule, LazyModuleFactory } from '@abp/ng.core';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { LazyModuleFactory } from '@abp/ng.core';
import { ModuleWithProviders, NgModule, NgModuleFactory } from '@angular/core';
import { SettingManagementComponent } from './components/setting-management.component';
import { SettingManagementRoutingModule } from './setting-management-routing.module';
@NgModule({
declarations: [SettingManagementComponent],
exports: [SettingManagementComponent],
imports: [SettingManagementRoutingModule, CoreModule, ThemeSharedModule, PageModule],
declarations: [],
exports: [],
imports: [SettingManagementRoutingModule],
})
export class SettingManagementModule {
static forChild(): ModuleWithProviders<SettingManagementModule> {

33
npm/ng-packs/packages/setting-management/src/lib/setting-management.routes.ts

@ -0,0 +1,33 @@
import { Routes } from '@angular/router';
import {
authGuard,
ReplaceableComponents,
ReplaceableRouteContainerStandaloneComponent,
RouterOutletStandaloneComponent,
} from '@abp/ng.core';
import { SettingManagementComponent } from './components/setting-management.component';
import { eSettingManagementComponents } from './enums/components';
import { provideSettingManagement } from './setting-management';
export const settingManagementRoutes: Routes = [
{
path: '',
component: RouterOutletStandaloneComponent,
canActivate: [authGuard],
providers: [...provideSettingManagement()],
children: [
{
path: '',
component: ReplaceableRouteContainerStandaloneComponent,
data: {
requiredPolicy: 'AbpAccount.SettingManagement',
replaceableComponent: {
key: eSettingManagementComponents.SettingManagement,
defaultComponent: SettingManagementComponent,
} as ReplaceableComponents.RouteData,
},
},
],
title: 'AbpSettingManagement::Settings',
},
];

3
npm/ng-packs/packages/setting-management/src/lib/setting-management.ts

@ -0,0 +1,3 @@
export function provideSettingManagement() {
return [];
}

1
npm/ng-packs/packages/setting-management/src/public-api.ts

@ -1,3 +1,4 @@
export * from './lib/setting-management.module';
export * from './lib/components/setting-management.component';
export * from './lib/enums';
export * from './lib/setting-management.routes';

Loading…
Cancel
Save