Open Closed

Missing provideAbpThemeShared() config on generated module #8899


User avatar
0
kengleongps created
  • ABP Framework version: v9.0.4

  • UI Type: Angular

  • Database System: EF Core (SQL Server)

  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no

  • Exception message and full stack trace:

  • Steps to reproduce the issue:

  1. Updated to ABP CLI 0.9.23 (Beta)

  2. Generate new module with command abp new-module Acme.BookStore -t module:ddd -u angular

  3. The generated app.module.ts file missing the provideAbpThemeShared() config.

  4. https://github.com/abpframework/abp/blob/9.0.4/templates/module/angular/projects/dev-app/src/app/app.module.ts has the provideAbpThemeShared() config.

  5. Do I need to clear any cache to get the latest module template?

The following is the generated content for \angular\projects\dev-app\src\app\app.module.ts

import { CoreModule, provideAbpCore, withOptions } from '@abp/ng.core';
import { registerLocale } from '@abp/ng.core/locale';
import { provideAccountConfig } from '@abp/ng.account/config';
import { provideIdentityConfig } from '@abp/ng.identity/config';
import { provideTenantManagementConfig } from '@abp/ng.tenant-management/config';
import { provideThemeBasicConfig, ThemeBasicModule } from '@abp/ng.theme.basic';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { provideAbpOAuth } from '@abp/ng.oauth';
import { provideSettingManagementConfig } from '@abp/ng.setting-management/config';
import { provideFeatureManagementConfig } from '@abp/ng.feature-management';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { BookStoreConfigModule } from '@acme/book-store/config';
import { environment } from '../environments/environment';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { APP_ROUTE_PROVIDER } from './route.provider';

@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
ThemeSharedModule,
CoreModule,
BookStoreConfigModule.forRoot(),
ThemeBasicModule,
],
providers: [
APP_ROUTE_PROVIDER,
provideAbpCore(
withOptions({
environment,
registerLocaleFn: registerLocale(),
})
),
provideAbpOAuth(),
provideIdentityConfig(),
provideAccountConfig(),
provideTenantManagementConfig(),
provideSettingManagementConfig(),
provideThemeBasicConfig(),
provideFeatureManagementConfig(),
],
declarations: [AppComponent],
bootstrap: [AppComponent],
})
export class AppModule {}


3 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, when you create a new ddd module template with new ABP Studio CLI (with abp new-module Acme.BookStore -t module:ddd -u angular command), then it gets the related template from Volo.Abp.Studio.Extensions.StandardSolutionTemplates NuGet package, so it's normal that the related file it's not same within the file in the link you shared.

    Best regards.

  • User Avatar
    0
    kengleongps created

    Thank you for your prompt response.

    I raise this ticket because the angular application hits the following error and not able to load successfully due to the missing provideAbpThemeShared() config.
    image.png

    Please advise.

    Thank you.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Thank you for your prompt response.

    I raise this ticket because the angular application hits the following error and not able to load successfully due to the missing provideAbpThemeShared() config.
    image.png

    Please advise.

    Thank you.

    Hi, it seems in the main app.module.ts file we have already imported the related provider, but forgot for dev-app. So, in the meantime, can you add it manually and run your application? We will update the template with the next patch release.

    Btw, your ticket is refunded. Thanks for reporting the issue.

    Best regards.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 13, 2025, 04:08