last step

This commit is contained in:
2025-11-04 11:53:12 +01:00
parent bd8432e078
commit a97eaf2a57
6 changed files with 598 additions and 120 deletions

View File

@@ -18,8 +18,12 @@ export class Home {
filteredLocationList: HousingLocationInfo[] = [];
constructor() {
this.housingLocationList = this.housingService.getAllHousingLocations();
this.filteredLocationList = this.housingLocationList;
this.housingService
.getAllHousingLocations()
.then((housingLocationList: HousingLocationInfo[]) => {
this.housingLocationList = housingLocationList;
this.filteredLocationList = housingLocationList;
});
}
filterResults(text: string) {
@@ -27,6 +31,8 @@ export class Home {
this.filteredLocationList = this.housingLocationList;
return;
}
this.filteredLocationList = this.housingLocationList.filter((housingLocation) => housingLocation?.city.toLowerCase().includes(text.toLowerCase()),);
this.filteredLocationList = this.housingLocationList
.filter((housingLocation) => housingLocation?.city.toLowerCase()
.includes(text.toLowerCase()),);
}
}