klausur-practice-3

This commit is contained in:
2026-02-13 01:20:12 +01:00
parent 0109ebcc6d
commit d15e0ca4cf
6 changed files with 101 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
<ul>
@for (product of products; track product.id) {
<li>
{{ product.name }} - Bestand: {{ product.stock }}
@if (product.stock == 0) { <span>(AUSVERKAUFT)</span> }
</li>
}
<hr>
</ul>
<form [formGroup]="orderForm" (ngSubmit)="submitOrder()">
<label for="name">Produktname: </label>
<input id="name" formControlName="productName" type="text" />
<br>
<label for="menge">Menge: </label>
<input id="menge" formControlName="amount" type="number" />
<br>
<input type="submit" value="Bestellen" />
</form>