I try to make a dynamic form (so you can limitless add items to a list), but somehow the content of my list is not getting send because it can\'t find the control with path:
I also encountered this error, and I solved this problem by initiating the variables of class(elements in this.fb.array([])
).
Code Snippet
mobileNumbers: this.fb.array([this.fb.group(new MobileNumber('IN'))]),
Where class MobileNumber is used.
export class MobileNumber{
public country_code: string;
public mobile_number: string;
constructor($cc){
this.country_code = COUNTRY_CODES[$cc];
}
}
To
export class MobileNumber{
public country_code = '';
public mobile_number = '';
constructor($cc){
this.country_code = COUNTRY_CODES[$cc];
}
}