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