2016-05-02 5 views
0

customGETメソッドから他のパラメータでいくつかのIDを送信したいと思います。それは私の方法だが、動作しません:いくつかのidとその他のパラメータを持つカスタムGETをRe​​stangleで送信する方法

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) { 
/* */ 
     }) 

おかげ

答えて

0

私は配列を送信するために'ids[]':の問題を解決:

Restangular.all('user').customGET('export/file',{param1:'test','ids[]':selection}).then(function(response) { 
/* */ 
     })