feat: add hotel details and list components with routing

This commit is contained in:
Jan K9f 2024-11-12 09:18:15 +01:00
commit 8dd8b8b438
Signed by: jank
GPG key ID: B267751B8AE29EFE
15 changed files with 181 additions and 66 deletions

View file

@ -5,18 +5,21 @@ import { CurrencyPipe, NgIf } from "@angular/common";
import { FormsModule } from "@angular/forms";
import { StarRatingComponent } from "../star-rating/star-rating.component";
import { HttpClient } from "@angular/common/http";
import { RouterLink } from "@angular/router";
@Component({
selector: 'app-hotel-item',
standalone: true,
templateUrl: './HotelItem.component.html',
imports: [ChildComponent, CurrencyPipe, FormsModule, StarRatingComponent, NgIf],
imports: [ChildComponent, CurrencyPipe, FormsModule, StarRatingComponent, NgIf, RouterLink],
})
export class HotelItem {
@Input() public hotel!: Hotel;
public selectedLanguage?: string;
@Input() public isDetail: boolean = false;
public languageChange(lang: string) {
this.selectedLanguage = lang;
console.log(this.selectedLanguage);