Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them, it only takes a minute:

I've been trying to follow this passing of multiple of parameters here

But got errors. The $promise returns undefined.

app.factory('ListUserResource', ListUserResource);
ListUserResource.$inject = ['$resource'];
function ListUserResource($resource) 
var url ='http://10.192.16.28:8080/fsoft-intranet-ws/user/:verb';
return {
theUsers: $resource(url, 
{ verb: 'details', pageSize:'@limit',     pageNo:'@page' }, 
{ query: { method: "GET", isArray: true }} )};
}

ListUserResource.theUsers.query({ limit : 10, page : 0 })
.$promise.then(function( response ){
console.log(response);         },
function( error ){
console.log("XHR Failed in getUser."+error.data);
})

Thanks

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.