Files
workshop/src/app/hotel/hotel.component.ts
2024-09-03 14:59:09 +02:00

22 lines
536 B
TypeScript

import {Component, Input} from "@angular/core";
import {Hotel} from "./hotel"
@Component({
standalone: true,
selector: 'app-hotel',
template: `
<div style="border: white 2px; border-radius: 2px">
<p class="name">Name: {{hotel.hotelName}}</p>
<p>Beschreibung: {{hotel.description}}</p>
<p>Preis: {{hotel.price}}/nacht</p>
<p>Sterne: {{hotel.rating}}/5</p>
<img width="64" height="64" src="{{hotel.imageUrl}}">
</div>
`
})
export class HotelComponent {
@Input()
public hotel!: Hotel;
}