From 4187da12dce6b0a5cd8040f30e088ce66a01fe4f Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Mon, 2 Feb 2026 16:04:39 +0200 Subject: [PATCH] Fix old extensions loading: Force standalone false for componenents declared inside module. --- .../app/core/services/resources.service.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/core/services/resources.service.ts b/ui-ngx/src/app/core/services/resources.service.ts index 444c06d3b1..2929de8b6c 100644 --- a/ui-ngx/src/app/core/services/resources.service.ts +++ b/ui-ngx/src/app/core/services/resources.service.ts @@ -32,7 +32,7 @@ import { forkJoin, from, Observable, ReplaySubject, throwError } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { IModulesMap } from '@modules/common/modules-map.models'; import { TbResourceId } from '@shared/models/id/tb-resource-id'; -import { camelCase, isObject } from '@core/utils'; +import { camelCase, isObject, isUndefined } from '@core/utils'; import { AuthService } from '@core/auth/auth.service'; import { select, Store } from '@ngrx/store'; import { selectIsAuthenticated } from '@core/auth/auth.selectors'; @@ -287,6 +287,23 @@ export class ResourcesService { module: moduleDef, components: [] } + const declarationsDecl = moduleDef.declarations; + let declarations: Type[]; + if (Array.isArray(declarationsDecl)) { + declarations = declarationsDecl; + } else { + declarations = declarationsDecl(); + } + if (declarations) { + for (const decl of declarations) { + if (ɵNG_COMP_DEF in decl) { + const component: ɵComponentDef = decl[ɵNG_COMP_DEF]; + if (isUndefined(component.standalone) || component.standalone) { + (component as any).standalone = false; + } + } + } + } modulesWithComponents.modules.push(moduleInfo); const exportsDecl = moduleDef.exports; let exports: Type[];