Hello! I'm not sure why I can't use FormGroupName...
public form: FormGroup = new FormGroup({
client: new FormGroup({
fileLink: new FormControl(''),
file: new FormControl(FileRef),
type: new FormControl('CLIENT_INSTRUCTIONS')
}),
contractor: new FormGroup({
fileLink: new FormControl(''),
file: new FormControl(FileRef),
type: new FormControl('CONTRACTOR_INSTRUCTIONS')
}),
rkas: new FormGroup({
fileLink: new FormControl(''),
file: new FormControl(FileRef),
type: new FormControl('RKAS_INSTRUCTIONS')
}),
});
// HTML
<div class="modal-body">
<div class="work-details-full-width" [formGroup]="form">
<div class="work-details-1-row">
<div class="work-details-1-col">
<label class="work-details-1-label">Klient</label>
// it can't find this client
<div class="w-100" [formGroupName]="client">
Lisa link või fail
<input class="form-control w-100"
formControlName="clientInput"
[class.is-invalid]="hasErrors(form.get('clientInput'))">
<instruction-files-section instructionFileType="clientInput"></instruction-files-section>
</div>
</div>