I would like to create an empty formarray so i will be able to push elements later.
i know that i can do something like this using "criterias.controls.length = 0;" after declaring the FormArray but i'm looking for a way to create the formArray with 0 length in the as part of the declaration.
criterias = new FormArray([]);
criterias.controls.length = 0;
values.forEach(item => {
criterias.controls.push(new FormGroup({
'type': new FormControl(item.type, Validators.required),
'criteria': new FormControl(item.criteria, Validators.required)
}));
});