angular-hotel-manager/src/app/app.component.ts

56 lines
1.4 KiB
TypeScript
Raw Normal View History

import { Component, input } from '@angular/core';
import { HotelItem } from './HotelItem/HotelItem.component';
import { CommonModule } from '@angular/common';
import { SearchComponent } from './Search/search.component';
2024-08-13 13:11:57 +02:00
@Component({
selector: 'app-root',
standalone: true,
imports: [HotelItem, CommonModule, SearchComponent],
2024-08-13 13:11:57 +02:00
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
public search: string = "";
2024-08-20 14:26:19 +02:00
public test() {
console.log(this.search);
2024-08-20 14:26:19 +02:00
}
public hotels = [
{
"hotelId": 1,
"hotelName": "Buea süßes Leben",
"description": "Schöne Aussicht am Meer",
"price": 230.5,
"imageUrl": "assets/img/1.jpg",
"rating": 3.5
},
{
"hotelId": 2,
"hotelName": "Marrakesch",
"description": "Genießen Sie den Blick auf die Berge",
"price": 145.5,
"imageUrl": "assets/img/2.jpg",
"rating": 5
},
{
"hotelId": 3,
"hotelName": "Abuja neuer Palast",
"description": "Kompletter Aufenthalt mit Autoservice",
"price": 120.12,
"imageUrl": "assets/img/3.jpg",
"rating": 4
},
{
"hotelId": 4,
"hotelName": "Kapstadt Stadt",
"description": "Wunderschönes Ambiente für Ihren Aufenthalt",
"price": 135.12,
"imageUrl": "assets/img/4.jpg",
"rating": 2.5
}
]
2024-08-13 13:11:57 +02:00
}
2024-08-20 14:26:19 +02:00