> Angular 8 Samples
As of Angular 8, there's a new way of clearing all items in a FormArray.
(this.recipeForm.get('ingredients')).clear();
The clear() method automatically loops through all registered FormControls (or FormGroups) in the FormArray and removes them.
It's like manually creating a loop and calling removeAt() for every item.
As of Angular 8, there's a new way of clearing all items in a FormArray.
(
It's like manually creating a loop and calling removeAt() for every item.