I'm trying to define a custom getUsers action to a $resource, but I get an error that the object has no getUsers method.
angular.module('myApp')
.factory('Customer', ['$resource', 'apiUrl', function ($resource, apiUrl) {
return $resource(apiUrl + '/customers/:id', {
query: {method: 'GET', isArray: true},
get: {method: 'GET'},
getUsers: {method: 'GET', url: apiUrl + '/customers/:id/users', isArray: true}
});
}]);
Using it with Customer.getUsers({id: 'id'})
I'm using 1.2.0-rc2. What am I missing here?