diff --git a/npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts b/npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts index 61846ad126..a411fa0ba9 100644 --- a/npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts +++ b/npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts @@ -82,7 +82,19 @@ export class DynamicLayoutComponent { const key = this.layouts.get(expectedLayout); this.layout = this.getComponent(key)?.component; this.layoutKey = expectedLayout; + if(!this.layout){ + this.showLayoutNotFoundError(expectedLayout); + } + } + + showLayoutNotFoundError(layoutName: string) { + let message = `Layout ${layoutName} not found.`; + if(layoutName === 'account'){ + message = '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.'; + } + console.error(message); } + private listenToLanguageChange() { this.subscription.addOne(this.localizationService.languageChange$, () => {