From d06d06e6cea5aab1f78a6bc9b175248047e724c2 Mon Sep 17 00:00:00 2001 From: jojohoch <joachim.hoch@iqb.hu-berlin.de> Date: Fri, 12 Nov 2021 10:12:33 +0100 Subject: [PATCH] Add abstract elementModel to CompoundElement Required to query the elementModels of all instances of this class. --- .../compound-elements/compound-element.directive.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/common/element-components/compound-elements/compound-element.directive.ts b/projects/common/element-components/compound-elements/compound-element.directive.ts index 7a0aa4ab1..0d4cf8b10 100644 --- a/projects/common/element-components/compound-elements/compound-element.directive.ts +++ b/projects/common/element-components/compound-elements/compound-element.directive.ts @@ -4,7 +4,7 @@ import { } from '@angular/core'; import { FormGroup } from '@angular/forms'; import { ElementComponent } from '../../element-component.directive'; -import { InputElement } from '../../models/uI-element'; +import { InputElement, UIElement } from '../../models/uI-element'; @Directive({ selector: 'app-compound-element' }) @@ -12,6 +12,7 @@ export abstract class CompoundElementComponent implements AfterViewInit { @Output() childrenAdded = new EventEmitter<QueryList<ElementComponent>>(); compoundChildren!: QueryList<ElementComponent>; parentForm!: FormGroup; + abstract elementModel: UIElement; ngAfterViewInit(): void { this.childrenAdded.emit(this.compoundChildren); -- GitLab