feat(HotelItem): update currency display logic and options

This commit is contained in:
Jan K9f 2024-09-17 08:23:33 +02:00
commit f575d73b3a
Signed by: jank
GPG key ID: B267751B8AE29EFE
2 changed files with 19 additions and 5 deletions

View file

@ -1,9 +1,9 @@
<p>Name: {{hotel.hotelName}}</p>
<p>Description: {{hotel.description}}</p>
<p>Price: {{hotel.price | currency : "EUR" : "symbol" : "2.2-2" : "de-DE"}}</p>
<p>Price: {{hotel.price | currency : getCurrencyCode(selectedLanguage) : "symbol" : "2.2-2" : selectedLanguage}}</p>
<select [ngModel]="selectedLanguage" (ngModelChange)="languageChange($event)">
@for (lang of langs; track lang.lang) {
<option value="{{lang.lang}}">{{lang.lang}}</option>
<option value="{{lang.code}}" [selected]="lang.lang === 'de'">{{lang.lang}}</option>
}
</select>
<img src="{{hotel.imageUrl}}" alt="Hotel">