98855: Remove temp themed ng-content container

This is problematic when ng-content is provided but it's not used
This commit is contained in:
Alexandre Vryghem
2023-02-06 10:15:24 +01:00
parent b3060707dd
commit da1a20096b

View File

@@ -91,11 +91,10 @@ export abstract class ThemedComponent<T> implements OnInit, OnDestroy, OnChanges
).subscribe((constructor: GenericConstructor<T>) => {
const factory = this.resolver.resolveComponentFactory(constructor);
const contentNodes = [[...this.themedElementContent.nativeElement.children].map(node => node)] || undefined;
this.compRef = this.vcr.createComponent(factory, undefined, undefined, contentNodes);
this.compRef = this.vcr.createComponent(factory, undefined, undefined, [this.themedElementContent.nativeElement.children]);
this.connectInputsAndOutputs();
this.cdr.markForCheck();
this.themedElementContent.nativeElement.remove();
});
}