I have a form array with a control called "foreground" which is null to start with:
(<FormArray>this.myForm.get('rooms')).push(this.fBuilder.group({
id: [element.id, [Validators.required]],
background: null,
foreground: null,
}));
But how can I turn it onto a form group with fields under it later on? I tried this:
room.controls.foreground(this.fBuilder.group({
foregroundImageID: [null, [Validators.required]],
foregroundImagePath: [null, [Validators.required]],
foregroundXPosition: [null, [Validators.required]],
foregroundYPosition: [null, [Validators.required]]
}));