What is the best way to send data from Angular js to node js restful service which uses express. My Angular js code is as follows:-
var myController = function("myController", $scope) {
$http.get("/someUrl", {key1:"value1", key2: "value2"}).then(function(response) { alert(response.data);});
On the Node js end :-
app.get("/someUrl", function(req, res) {console.log(req.body);});
I can see that console.log is displaying {}. Is there a way to send the json input for get as well.
By the way for Nodejs I used express module, I have used body-parser and set all the other things needed.
I am using Angularjs 1.4 and Nodejs express 4.
$http({ method: 'GET', url: '/url', params: params })is a good option or not.