This commit is contained in:
Phan Huy Tran
2024-11-20 10:20:42 +01:00
parent 953e9a6def
commit ed06f5d1ca
7 changed files with 38 additions and 28 deletions

View File

@ -15,9 +15,10 @@ import {FormsModule} from '@angular/forms';
export class ShowFormComponent {
showService: ShowService = inject(ShowService);
show: Show = new Show(null, null);
shows: Show[] = this.showService.getShows();
save() {
this.showService.getShows().push(this.show);
this.shows.push(this.show);
this.show = new Show(null, null);
}