feat: add hotel details and list components with routing
This commit is contained in:
parent
d773cfe4bf
commit
8dd8b8b438
15 changed files with 181 additions and 66 deletions
|
@ -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);
|
||||
|
|
Reference in a new issue