Skip to content

Commit 98a32bc

Browse files
authored
Merge pull request #23524 from abpframework/issue/update-template-configurations
Angular - Removing module usage from application configurations
2 parents 72f1593 + 488179c commit 98a32bc

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

templates/app-nolayers/angular/src/app/app.config.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
1+
import { ApplicationConfig } from '@angular/core';
22
import { provideAnimations } from '@angular/platform-browser/animations';
33
import { provideRouter } from '@angular/router';
44
import { appRoutes } from './app.routes';
@@ -13,8 +13,8 @@ import { provideAccountConfig } from '@abp/ng.account/config';
1313
import { provideIdentityConfig } from '@abp/ng.identity/config';
1414
import { provideTenantManagementConfig } from '@abp/ng.tenant-management/config';
1515
import { provideFeatureManagementConfig } from '@abp/ng.feature-management';
16-
import { ThemeLeptonXModule } from '@abp/ng.theme.lepton-x';
17-
import { SideMenuLayoutModule } from '@abp/ng.theme.lepton-x/layouts';
16+
import { provideThemeLeptonX } from '@abp/ng.theme.lepton-x';
17+
import { provideSideMenuLayout } from '@abp/ng.theme.lepton-x/layouts';
1818
import { provideLogo, withEnvironmentOptions } from '@volo/ngx-lepton-x.core';
1919

2020
export const appConfig: ApplicationConfig = {
@@ -27,6 +27,8 @@ export const appConfig: ApplicationConfig = {
2727
registerLocaleFn: registerLocale(),
2828
})
2929
),
30+
provideThemeLeptonX(),
31+
provideSideMenuLayout(),
3032
provideAbpOAuth(),
3133
provideAbpThemeShared(),
3234
provideSettingManagementConfig(),
@@ -36,6 +38,5 @@ export const appConfig: ApplicationConfig = {
3638
provideFeatureManagementConfig(),
3739
provideAnimations(),
3840
provideLogo(withEnvironmentOptions(environment)),
39-
importProvidersFrom([ThemeLeptonXModule.forRoot(), SideMenuLayoutModule.forRoot()]),
4041
],
4142
};

templates/app/angular/src/app/app.config.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
1+
import { ApplicationConfig } from '@angular/core';
22
import { provideRouter } from '@angular/router';
33
import { provideAnimations } from '@angular/platform-browser/animations';
44

@@ -14,9 +14,8 @@ import { provideAccountConfig } from '@abp/ng.account/config';
1414
import { provideIdentityConfig } from '@abp/ng.identity/config';
1515
import { provideTenantManagementConfig } from '@abp/ng.tenant-management/config';
1616
import { provideFeatureManagementConfig } from '@abp/ng.feature-management';
17-
import { ThemeLeptonXModule } from '@abp/ng.theme.lepton-x';
18-
import { SideMenuLayoutModule } from '@abp/ng.theme.lepton-x/layouts';
19-
import { AccountLayoutModule } from '@abp/ng.theme.lepton-x/account';
17+
import { provideThemeLeptonX } from '@abp/ng.theme.lepton-x';
18+
import { provideSideMenuLayout } from '@abp/ng.theme.lepton-x/layouts';
2019
import { provideLogo, withEnvironmentOptions } from '@volo/ngx-lepton-x.core';
2120

2221
export const appConfig: ApplicationConfig = {
@@ -29,6 +28,8 @@ export const appConfig: ApplicationConfig = {
2928
registerLocaleFn: registerLocale(),
3029
})
3130
),
31+
provideThemeLeptonX(),
32+
provideSideMenuLayout(),
3233
provideAbpOAuth(),
3334
provideAbpThemeShared(),
3435
provideSettingManagementConfig(),
@@ -37,12 +38,6 @@ export const appConfig: ApplicationConfig = {
3738
provideTenantManagementConfig(),
3839
provideFeatureManagementConfig(),
3940
provideAnimations(),
40-
provideAbpCore(),
4141
provideLogo(withEnvironmentOptions(environment)),
42-
importProvidersFrom([
43-
ThemeLeptonXModule.forRoot(),
44-
SideMenuLayoutModule.forRoot(),
45-
AccountLayoutModule.forRoot(),
46-
]),
4742
],
4843
};

0 commit comments

Comments
 (0)