Мне нужна помощь, чтобы узнать, как вызвать API удаления после модального подтверждения в Angular.
onDelete (id: номер) {
this.confirmationDialogService.confirm('Confirm Delete', 'Do you really want to delete this document?')
.then(() => this.employeeService.deleteEmployee(id)) //this is not working
//.catch(() => console.log('User dismissed the dialog (e.g., by using ESC, clicking the cross icon, or clicking outside the dialog)'));
/*if (confirm('Are you sure you want delete this record?') == true) {
this.employeeService.deleteEmployee(id);
}*/
}
Как вы можете видеть в коде.Мне нужно знать, как я делаю вызов API удаления после нажатия кнопки ОК в модале.