I've searched the web. I found a couple of things but I wasn't able to understand anything out.
I'm trying to send a get request from my angular to Node.js server. I want to send some search parameters for the my server. and it searches then returns the documents.
I'm tring this function to get send the request. But I don't know how to ad parameters beside this request.
GetCases(){
return this.http.get('/api/saleCases')
.map((response:Response)=>response.json());
}
In the server side
router.get('/saleCases', function(req, res){
console.log('get request for all cases');
Case.find({}).exec(function(err, cases){
if(err){
console.log("error retriving videos");
}else{
res.json(cases);
}
});
});
Can you help me to add the parameters in angular and read them in node.js? Or is there any kind of way that you can suggest me to use?