Ends in:
2 DAYS
2 HRS
16 MIN
36 SEC
Ends in:
2 D
2 H
16 M
36 S
Open Closed

The angular account/login page is not working #5417


User avatar
0
CI created
  • ABP Framework version: v7.3.0
  • UI type: Angular
  • DB provider: EF Core /
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • **Exception message and stack traceAccount layout not found. Please check your configuration. If you are using LeptonX, please make sure you have added "AccountLayoutModule.forRoot()" to your app.module configuration.:
  • Steps to reproduce the issue:"

The angular account/login page is not working. It stays blank and gives the error in the console: "Account layout not found. Please check your configuration. If you are using LeptonX, please make sure you have added "AccountLayoutModule.forRoot()" to your app.module configuration"

I downloaded version 7.3.0 and configured the login through front angular according to the documentation.

Is this a bug in version 7.3.0?


1 Answer(s)
  • User Avatar
    0
    mahmut.gundogdu created

    I see the issue. We made a mistake in v7.3; it will be fixed in the next patch version. I refunded your credit. Here a workaround. You should add a provider.

    import { AccountLayoutComponent, AccountLayoutModule } from '@volosoft/abp.ng.theme.lepton-x/account';
    import { APP_INITIALIZER, NgModule, inject } from '@angular/core';
    import { CoreModule, ReplaceableComponentsService } from '@abp/ng.core';
    
    import {  eThemeLeptonXComponents } from '@volosoft/abp.ng.theme.lepton-x';
    
    
    
    const ACCOUNT_PROVIDER = {
      provide: APP_INITIALIZER,
      useFactory: ()=> {
        const replaceableComponents = inject(ReplaceableComponentsService);
        return () => {
          replaceableComponents.add({
            key: eThemeLeptonXComponents.AccountLayout,
            component: AccountLayoutComponent,
          });
        }
      },
      multi: true,
    }
    
    @NgModule({
    //...
      providers: [APP_ROUTE_PROVIDER,  ACCOUNT_PROVIDER],
      bootstrap: [AppComponent],
    })
    export class AppModule {}
    
    
Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35