angular 2 remove all items from a formarray

后端 未结 15 1730
清歌不尽
清歌不尽 2020-12-07 15:30

I have a form array inside a formbuilder and i am dynamically changing forms, i.e. on click load data from application 1 etc.

The issue i am having is that all the

15条回答
  •  时光取名叫无心
    2020-12-07 16:34

    Angular 8

    simply use clear() method on formArrays :

    (this.invoiceForm.controls['other_Partners'] as FormArray).clear();
    

提交回复
热议问题