I have that code in the angularJS factory:
myFactory.addNC = function (n) {
return $http.post('/api/addNC/', { c: n }).then(function (data) {
return data;
});
}
MVC ApiController:
[HttpPost]
public void addNC([FromUri]string c = null)
{
...
}
but 'c' param is null, why ? I see in FireBug that the value is being posted.
Also, if I declare the param like public void addNewCat([FromUri]string c) I get the 404 error - why ?
[FromBody]for a POST?