Answers for "clear angular formarray"

2

clear angular formarray

const arr = new FormArray([
   new FormControl(),
   new FormControl()
]);
console.log(arr.length);  // 2

arr.clear();
console.log(arr.length);  // 0
Posted by: Guest on October-29-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language