Check out my page.html code:
<ion-content *ngIf="charged">
Order ID: {{order.id_acg}}
Item Weight(g):
Height(cm):
Width(cm):
Length(cm):
<ion-list *ngFor="let row of order.rows">
<ion-item>
<ion-label>Row to prepare:<strong>{{row.rowId}}</strong> </ion-label>
<ion-checkbox [(ngModel)]="row.checked" name="row_id" value="option" (click)="onChange(option)"></ion-checkbox>
</ion-item>
</ion-list>
<ion-button color="success" type="submit" expand="block" [disabled]=" !f.valid && checkedRows.length < 1 " >Create shipment
</ion-button>
<ion-button color="success" type="submit" expand="block" [disabled]=" !f.valid && checkedRows.length < 1 " (* <== do something like that*)> Create shipment </ion-button>
I am looking to make the confirm button active only when all fields are filled out and at least one checkbox is checked. I can accomplish this separately but not together. Thank you all!!
UPDATE: Here is the form in the preview ion-content:
<form #f="ngForm" (ngSubmit)="onUpdate()" class="ion-text-center ion-margin-bottom ion-margin-top">
<ion-card-title><strong> Order ID: </strong>{{order.id_acg}}</ion-card-title>
<ion-item>
<ion-label>Item Weight(g): </ion-label>
<ion-input required type="number" name="weight" [(ngModel)]="order.weight" placeholder="eg: 1500"></ion-input>
</ion-item>
<ion-item>
<ion-label>Height(cm): </ion-label>
<ion-input required type="number" name="height" [(ngModel)]="order.height" placeholder="eg: 0.60"></ion-input>
</ion-item>
<ion-item>
<ion-label>Width(cm): </ion-label>
<ion-input required type="number" name="width" [(ngModel)]="order.width" placeholder="eg: 0.30">
</ion-input>
</ion-item>
<ion-item>
<ion-label>Length(cm): </ion-label>
<ion-input required type="number" name="length" [(ngModel)]="order.length" placeholder="eg: 0.20">
</ion-input>
</ion-item>
<ion-list *ngFor="let row of order.rows">
<ion-item>
<ion-label>Row ID to prepare: <strong> {{row.rowId}}</strong> </ion-label>
<ion-checkbox [(ngModel)]="row.checked" name="row_id" value="option" (click)="onChange(option)"></ion-checkbox>
</ion-item>
</ion-list>
<ion-button color="success" type="submit" expand="block" [disabled]=" !(f.valid && checkedRows.length > 1)" >Create shipment
</ion-button>