In my angularjs code I have this:
$http.post("Home/PostData", {name:'Peter',age:18}).success(function (response) {
});
And I have this method in my asp.net 5 controller:
[HttpPost]
public IActionResult PostData(string name,int age)
{
}
I've put a break point on the method and it gets fired, but my name is null and age is 0.
I have done that before by using asp.net mvc 5 and that worked.
Why is wrong in asp.net 5?