Set Value Not Less Than 0 In FormArray Reactive Forms
问题 I have successfully implemented the value in the input field to not less than 1 in the "quantityControl" formControlName. However my problem is when on the formArray. How can i set that to not than less than 0 or should not be a negative number? Here's the code below and the link to my stackblitz CODE LINK this.inquiryForm.get('quantityControl').valueChanges.pipe( filter(quantity => quantity < 1) ).subscribe(value => { console.log(value); this.inquiryForm.get('quantityControl').setValue(1); }