I want to pass a query like that to the server:
/rest/articles/getTexts?tagIds[]=1&tagIds[]=88
I can do it with $.param like this:
var tagIds = [1, 88]
var param = $.param({tagIds: tagIds});
I've tried the same with angular:
var tagIds = [1, 88]
$http.get(serverUrl + "articles/getTexts" + {params:{tagIds: tagIds }})
But it produced the string like this:
/rest/articles/getTexts?tagIds=1&tagIds=88
Note the square brackets missing which leads to ovveriding of tagIds parameter on server side instead of making an array of it like in the case with jquery's param. Am I using angular's params in the wrong way or it's not possible to achieve what I want?
params :{ tagIds: JSON.stringify(tagIds) }?