I am attempting to remove the element from productForm
with the value "Ticket stock", but currently I can only remove items based on their status such as invalid, pristine, or dirty.
let desc = "Ticket stock"
// let index = this.productForm.controls.findIndex((control) => control.pristine);
const index = (this.productForm as FormArray).controls.findIndex(
(control) => control.invalid
);
console.log(index);
this.productForm.removeAt(index);