This commit is contained in:
Phan Huy Tran
2024-11-20 10:06:03 +01:00
parent eb34e2cd1f
commit 953e9a6def
21 changed files with 801 additions and 575 deletions

View File

@ -0,0 +1,24 @@
import {Component, inject} from '@angular/core';
import {ShowService} from '../../services/show.service';
import {Show} from '../../model/show';
import {FormsModule} from '@angular/forms';
@Component({
selector: 'app-show-form',
standalone: true,
imports: [
FormsModule
],
templateUrl: './show-form.component.html',
styleUrl: './show-form.component.css'
})
export class ShowFormComponent {
showService: ShowService = inject(ShowService);
show: Show = new Show(null, null);
save() {
this.showService.getShows().push(this.show);
this.show = new Show(null, null);
}
}