How to send customGET with several ids and other parameter
Closed this issue · 2 comments
essivision commented
Hi
I want to send several ids with other parameter from customGET
method. It's my method but doesn't work:
var selection = [2,10,20];
// send GET /api/user/export/file?param1=test&ids=2,10,20
Restangular.all('user').customGET('export/file',{param1:'test',ids:selection}).then(function(response) {
/* */
})
Thanks
daviesgeek commented
Just use join
var selection = [2,10,20]
Restangular.all('user').customGET('export/file', {param1:'test', ids: selection.join(',')})
daviesgeek commented
I'm going to go ahead and close this. Feel free to re-open if there's still an issue!