Dont allow negative quantities
This commit is contained in:
parent
91e40929e0
commit
fac4a7b31e
@ -7,7 +7,7 @@
|
|||||||
<mat-form-field class="mr-1" style="width: 40px">
|
<mat-form-field class="mr-1" style="width: 40px">
|
||||||
<input #quantity matInput type="number" value="1" min="1">
|
<input #quantity matInput type="number" value="1" min="1">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<button mat-raised-button color="primary" (click)="app.addToCart(product.id, product.name, product.price, quantity.value)">
|
<button mat-raised-button color="primary" [disabled]="quantity.value < 1" (click)="app.addToCart(product.id, product.name, product.price, quantity.value)">
|
||||||
<mat-icon>add_shopping_cart</mat-icon> Buy
|
<mat-icon>add_shopping_cart</mat-icon> Buy
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user