So if I have this controller action:
[Route("{id:int}")]
public async Task<JsonResponse> GetAsync(int id)
{
}
Sending data to it from Angular, like this:
$http.get('/api/someController', { params: { id: someId } });
Doesn't cut it. It needs to have the URL generated to look like this:
/api/someController/someId
I would like to retain this Web API 2 feature, so how do I get Angular to build my URL differently?
Apart from the obvious:
$http.get('api/someController/' + someId);
If it has to be done the above way, I don't mind. However, I'm just wondering if someone has a solution for this? That isn't overly complicated.