here is controller code:
[HttpGet]
public string test()
{
return "hi there";
}
and here is Angular code:
function testFunction()
{
$http.get('http://localhost:1675/api/Product/test').
success(function (data, status, headers, config) {
alert(data);
}).error(function (data, status, headers, config) {
alert('Error');
});
}
it access the controller but it goes to error
function!, when data
is checked it was found null! it suppose to return hi there
anything wrong in this code?