I have a form using the reactive form approach. The form is created as follow in my pug:
form([formGroup]=\'form\', novalidate=\'\', (ngSubmit)=\'postSurvey(
I came across looking for a solution to the similar issue and then found a solution myself. My issue was the following. I had a form like this
form: FormGroup = new FormGroup({
status: new FormArray([])
});
Initially it was represented by the list of checkboxes for each status on the template. And then I created a custom component to represent status selector and used it in template like so
The problem is that formControlName must point to FormControl instance, but actually it was pointing to a FormArray instance. So, changing to status: new FormControl([]) fixed this issue for me.