I'm encountering an issue with my Angular code:
DepartmentController.prototype.delete = function (id) {
this.departmentResource.delete(id);
};
The error message I'm receiving is:
DELETE http://localhost:64956//api/departments 405 (Method Not Allowed)
This is my department factory:
var Company;
(function (Company) {
function departmentFactory($resource, servicePath) {
return $resource(servicePath + "/api/departments/:serverAction/:id", null, Company.DepartmentResourceActionDescriptors.actions);
}
Company.departmentFactory = departmentFactory;
departmentFactory.$inject = ['$resource', 'servicePath'];
})(Company || (Company = {}));
After setting a breakpoint following the call to the delete method from the controller, the id parameter appears to be correct. Can anyone provide assistance?