[Solved] ReactiveForm for dynamically updated form entries
If you use ReactiveForm, you need use a FormArray A FormArray can be of FormControl or a FormGroup FormArray of FormControls constructor(private fb:FormBuilder) {} ngOnInit() { //We create an array of FormControl, each question a FormControl let data:FormControl[]=this.questions.map(q=>new FormControl()); this.myform=this.fb.group({ questions:new FormArray(data) }) } //the .html <!–we use *ngIf to show the form only when … Read more