无法使用web api中的ngresource.getting null值传递自定义对象。
app.factory("Entry", function ($resource) {
return $resource("/api/Emp/",
{ },
{
"putmethod1": { 'url': '/TestEmployee', 'method': 'GET', 'params': { employee: '@employee' } }
}
);
});
postData = {
"id": 1,
"Empname": "The Hitchhiker's Guide to the Galaxy",
"Address": "Douglas Adams"
};
var ent = Entry.putmethod1({ employee: postData });
[Route("TestEmployee")]
public IHttpActionResult GETEmployee1(Employee employee)
{
}
Employee对象为null。请告诉我哪里出错了?