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); shows: Show[] = this.showService.getShows(); save() { this.shows.push(this.show); this.show = new Show(null, null); } }