I have a form array that takes input from the user. I need to read each element of the form array individually and insert it into a database using a web service. However, I am struggling to create a method to handle this. Here is my code for the form array:
createskillForm()
{
this.skillForm = this.formBuilder.group({
skills: this.formBuilder.array([this.createskillField()])
});
}
Here is the method for creating a skill field:
createskillField(): FormGroup
{
return this.formBuilder.group({
skills: ['', Validators.required]
});
}
Can anyone help me with figuring out how to read each element of the form array individually?