Reputation: 39484
I am calling a service using angular as follows:
return $http.get('api/properties', { params: { id: id } });
In this case the resulting url is:
api/properties?id=2
So I am getting an error because I would need:
api/properties/2
What would be the correct way have this url?
Upvotes: 0
Views: 69
Reputation: 7179
sounds silly but concatenate the string will do
$http.get('api/properties/' + id);
Upvotes: 2