Open Closed

Adding new custom route to Angular ABP application #6273


User avatar
0
Pavlo created

I have an account module with personal info, 2 steps verification, and others standard tabs on account/manage route.
I have added my custom tab, in which I have a reset-password link that should move me to account/reset-password.
But i see only eception message

  • ABP Framework version: v7.2.2

  • UI Type: Angular

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

  • Exception message and full stack trace:
    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

  • Steps to reproduce the issue:

  1. I have added custom Acount module and ovverided it in app-routing module

  2. Added account routing module with need route:

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { CustomChangePasswordComponent } from './custom-change-password/custom-change-password.component';

const routes: Routes = [
  {
    path: 'change-password',
    component: CustomChangePasswordComponent,
  },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class AccoutRoutingModule {}
  1. Imported it in account-module:

import { NgModule } from '@angular/core';
import { AccountPublicModule } from '@volo/abp.ng.account/public';

import { SharedModule } from '../shared/shared.module';
import { CustomChangePasswordComponent } from './custom-change-password/custom-change-password.component';
import { CustomManageProfileComponent } from './custom-manage-profile/custom-manage-profile.component';
import { OrganizationTabComponent } from './tabs/organization-tab/organization-tab.component';
import { AccoutRoutingModule } from './account-routing.module';

@NgModule({
  declarations: [
    CustomManageProfileComponent,
    OrganizationTabComponent,
    CustomChangePasswordComponent,
  ],
  imports: [AccountPublicModule.forChild({}), SharedModule, AccoutRoutingModule],
})
export class AccountModule {}

After accessing it goes this error:
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

Thanks


2 Answer(s)
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.3.0-preview. Updated on April 11, 2025, 10:10