I have a table of values :
var array = [10,11,12,13,14,15] and I would like to integrate it into an http.get as parameters but in the following form :
id=10&id=11&id=12&id=13&id=14&id=15 I thought of doing the following way :
var url = /myUrl; var urlParam; array.map(function(item) { urlParam += '&id=' + item ; return urlParam; }); but in the end my URL looks like this :
ERRONEOUS
/myUrl&id=10&id=11&id=12&id=13&id=14&id=15
instead of :
/myUrl?id=10&id=11&id=12&id=13&id=14&id=15 for the
$http.get('/myUrl' + urlParam); is there a better solution ?