Here is my call to the delete method to the service from the component.
constructor(private wos: WorkorderService) {}
canceled(workOrder) {
this.wos.deleteWorkOrder(workOrder);
}
Here is the delete method on the service.ts file
deleteWorkOrder(workOrder) {
this.http.delete(this.BASE_URL + '/deleteworkorder/' +
workOrder.accountNumber).subscribe((response) => {
console.log("deleted");
})
}
And this is the error message I get on the console:
ERROR Object { headers: {…}, status: 0, statusText: "Unknown Error", url: null, ok: false, name: "HttpErrorResponse", message: "Http failure response for (unknown url): 0 Unknown Error", error: error }
The API works fine as I have tried the statement with Postman. Please advise!

Allow: Deleteheader should beAccess-Control-Allow-Methods: DELETE.