我在我的项目中使用Spring Boot,Rest和angular,其中显示了有关提取,编辑,删除和添加新员工的详细信息。使用ng2表单击DELETE按钮时,我无法获得任何成功或错误消息。
protected emitOnRemoved(element: Row) {
const options = {
headers: new HttpHeaders({
'Content-Type': 'application/json'
})
}
var err : any;
console.log("user to delete:" + "1711111");
let url = 'http://localhost:Port/someEmployees/1711111';
console.log("url "+url);
return this.http.delete(url,options).subscribe(data => console.log(data),
err => console.log(err),
() => console.log('yay'));
}