feat(product-selection): add loading state during product fetch
This commit is contained in:
@ -1,4 +1,8 @@
|
||||
<select [ngModel]="selectedProduct()" (ngModelChange)="onProductChange($event)">
|
||||
<option [ngValue]="null">Select a product</option>
|
||||
<option *ngFor="let product of products()" [ngValue]="product">{{ product.title }} - {{ product.price | currency : 'EUR' : 'symbol' : '1.2-2' }}</option>
|
||||
<ng-container *ngIf="isProductLoading()">
|
||||
<div>Loading...</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!isProductLoading()">
|
||||
<select [ngModel]="selectedProduct()" (ngModelChange)="onProductChange($event)">
|
||||
<option [ngValue]="null">Select a product</option>
|
||||
<option *ngFor="let product of products()" [ngValue]="product">{{ product.title }} - {{ product.price | currency : 'EUR' : 'symbol' : '1.2-2' }}</option>
|
||||
</select>
|
Reference in New Issue
Block a user