Files
flights_web/ClientApp/src/app/modules/components/buy-ticket-button/buy-ticket-button.component.ts
T

20 lines
540 B
TypeScript

import { Component, Input } from '@angular/core';
import { FlightModel } from '@app/shared/models-legacy';
import { BuyTicketLogic } from './buy-ticket.logic';
@Component({
selector: 'buy-ticket-button',
templateUrl: './buy-ticket-button.component.html',
styleUrls: ['./buy-ticket-button.component.scss']
})
export class BuyTicketButtonComponent {
@Input() direct: FlightModel;
@Input() returning: FlightModel;
constructor(private logic: BuyTicketLogic) {}
buy() {
this.logic.buyAll(this.direct, this.returning);
}
}