feat: update hotel service to use observables
All checks were successful
Build / Build and analyze (push) Successful in 1m41s
All checks were successful
Build / Build and analyze (push) Successful in 1m41s
This commit is contained in:
parent
5e739e63e7
commit
26ea503cbd
3 changed files with 11 additions and 20 deletions
|
@ -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>
|
||||
}
|
||||
|
|
Reference in a new issue