Skip to content

FormArray

FormArray manages a dynamic list of FormControl or FormGroup instances, useful for collections that users can add/remove.

this.skills = new FormArray([
new FormControl('Angular'),
new FormControl('TypeScript')
]);
addSkill() {
this.skills.push(new FormControl(''));
}
removeSkill(index: number) {
this.skills.removeAt(index);
}

FormArray handles dynamic collections of form controls with ease.”