refactor: update product selection logic and bindings

This commit is contained in:
2025-04-29 09:36:49 +02:00
parent b9c29a5dea
commit 1c46e15836
2 changed files with 6 additions and 11 deletions

View File

@ -1,4 +1,4 @@
<select [ngModel]="selectedProductId()" (ngModelChange)="onProductChange($event)">
<select [ngModel]="selectedProduct()" (ngModelChange)="onProductChange($event)">
<option [ngValue]="null">Select a product</option>
<option *ngFor="let product of products()" [ngValue]="product.id">{{ product.title }} - {{ product.price | currency : 'EUR' : 'symbol' : '1.2-2' }}</option>
<option *ngFor="let product of products()" [ngValue]="product">{{ product.title }} - {{ product.price | currency : 'EUR' : 'symbol' : '1.2-2' }}</option>
</select>