add functionality to delete employee button #11
@ -26,8 +26,7 @@ import EmployeeApiService from "../services/employee-api.service";
|
||||
export class DeleteEmployeeComponent {
|
||||
private apiService: EmployeeApiService = inject(EmployeeApiService);
|
||||
|
||||
constructor(@Inject(MAT_DIALOG_DATA) protected employee: Employee) {
|
||||
}
|
||||
protected employee: Employee = inject(MAT_DIALOG_DATA);
|
||||
|
||||
deleteEmployee(id: number) {
|
||||
this.apiService.deleteById(id).subscribe();
|
||||
|
Reference in New Issue
Block a user