I can't seem to find an answer to what seems like a reasonable question.
I am using the $http service to call web services for all of my app. All of the server API is hosted at a particular address. Is there any way in which I can get $http to always prefix the provided URL with the API server?
For example, if my API is at http://myAPi/API/, I would like to be able to call:
$http.get("User")...
as opposed to:
$http.get("http://myAPI/API/User")
And Angular prefixes the request with the server address. The aim is to not have the URL spread throughout the app.
Is there a way to achieve this with Angular?