I am querying data from mongodb and sending that as a json to a URL
querying data from mongodb
router.get('fillSurvey/:ID', function (req, res) {
Survey.findOne({_id:req.params.ID}, function ( err, survey, count ){
res.send(json);
});
});
I want to use angular http get to fetch this json data. The problem I have is what should be the url in angular http get? The problem arises because there is a /:ID in the above url.
var url = 'fillSurvey/' + 12
if you wanna get with id = 12