Angular 2: Accessing data from FormArray

前端 未结 4 1053
生来不讨喜
生来不讨喜 2021-01-31 16:23

I have prepared a from using ReactiveForms provided by angular2/forms. This form has a form array products:

this.checkoutFormGroup = this.fb.group({
                     


        
4条回答
  •  死守一世寂寞
    2021-01-31 16:55

    One liner as an option to the current accepted answer

    var item = (this.checkoutFormGroup.get('products')).at(index);
    

提交回复
热议问题