My resource is:
angular.module('myApp.services')
.factory('MyResource', ['$resource', function ($resource) {
return $resource('http://example.org', {}, {});
}]);
How I do a GET request is:
MyResource.get({z: 5, a: 4});
The URL generated by AngularJS is:
How I want the URL to be is:
Any solutions?
P.S. I thought using an interceptor could do the trick but there is no method for intercepting a request, but there are optional methods called response
and responseError
. This is because interceptors for $resource and $http are different. See: $resource and $http