angular formarray delete all code example
Example 1: angular formarray remove all
const arr = new FormArray([
new FormControl(),
new FormControl()
]);
console.log(arr.length); // 2
arr.clear();
console.log(arr.length); // 0
Example 2: how to remove all element from formarray
formArray.clear();