Can we get the variables in the query string in Node.js just like we get them in $_GET
in PHP?
I know that in Node.js we can get the URL in the request.
I am using MEANJS 0.6.0 with express@4.16, it's good
Client:
Controller:
var input = { keyword: vm.keyword };
ProductAPi.getOrder(input)
services:
this.getOrder = function (input) {return $http.get('/api/order', { params: input });};
Server
routes
app.route('/api/order').get(products.order);
controller
exports.order = function (req, res) {
var keyword = req.query.keyword
...