how to pass arraylist to $http.get(url, data) in AngularJS [Resolved]

Posted by Kasani007 under AngularJS on 4/16/2016 | Points: 10 | Views : 410 | Status : [Member] | Replies : 2
how to pass arraylist to $http.get(url, data) in AngularJS

var data= $.param({
arra[]
});

$http.get(url, data)
.success(data, status, headers, config)
.error(data, status, headers, config);

how to passs the array to the url ?

and handle in c#

please help me....




Responses

Posted by: Sheonarayan on: 4/16/2016 [Administrator] HonoraryPlatinum | Points: 50

Up
0
Down

Resolved
$http.get always sends data in the form of querystring so there is no ways where you can send an array through it. So what you can do is to convert the array into Comma separated values and then send it.

Read more about $http.get here in my tutorials http://techfunda.com/howto/562/http-get-server-request.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Kasani007, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajnilari2015 on: 4/17/2016 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

Up
0
Down
@Kasani007 Sir, another option is to use HttpPost

--
Thanks & Regards,
RNA Team

Kasani007, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response