feat: update hotel service to use observables
All checks were successful
Build / Build and analyze (push) Successful in 1m41s

This commit is contained in:
Jan K9f 2024-10-22 07:31:11 +02:00
commit 26ea503cbd
Signed by: jank
GPG key ID: B267751B8AE29EFE
3 changed files with 11 additions and 20 deletions

View file

@ -1,11 +1,7 @@
<h1>{{'hello' | uppercase | text}}</h1>
<app-search [(input)]="search"></app-search>
@for (hotel of hotels; track hotel.hotelId) {
@let should_show = search === "" || hotel.hotelName.includes(search);
@if (should_show) {
@for (let hotel of foundHotels | async) {
@if (search === "") {
<app-hotel-item [hotel]="hotel"></app-hotel-item>
}
}
@if (!has_hotels()) {
<p>No hotels found</p>
}