Skip to content Skip to sidebar Skip to footer

Get Data From Get Request In Node.js Parameters Undefined

I am trying to get parameters from get request in Node.js through Angular.JS but getting undefined in output http://localhost:3000/admin/dashboard?id=582c5211c8a8e06c0849a238 My

Solution 1:

http://localhost:3000/admin/dashboard?id=582c5211c8a8e06c0849a238

Here as you are passing in query so try req.query.id

If you are passing the parameters as http://localhost:3000/admin/dashboard/582c5211c8a8e06c0849a238 then you can use req.params.id

Post a Comment for "Get Data From Get Request In Node.js Parameters Undefined"