I have this 2 rows in 2 tables in angular that has only one submit button and i need help since I can only disable the submit button if the 2 rows in 2 tables are empty. How can i only disable the button if only 1 of the row is empty but the other one is not empty? <button type="submit" class="btn btn-primary float-right" [disabled]="!myForm.valid || myForm.controls.rows.length == 0">Save</button>
ts
this.myForm = this.fb.group({
rows: this.fb.array([]),
rows2: this.fb.array([])
});
html
<form class="form-horizontal" [formGroup]="myForm" (ngSubmit)="onCreate()" >
<div class="card-block" formArrayName="rows">
<table>
<tr *ngFor="let row of myForm.controls.rows.controls; let i = index" [formGroupName]="i">
....
</table>
</div>
<div class="card-block" formArrayName="rows2">
<table>
<tr *ngFor="let row2 of myForm.controls.rows2.controls; let i2 = index" [formGroupName]="i2">
...
</tr>
</table>
</div>
<button type="submit" class="btn btn-primary float-right" [disabled]="!myForm.valid || myForm.controls.rows.length == 0">Save</button>
</form>