I have an object, like this:
$scope.user = {name: "Jim", birthday: "1/1/90", address: "123 Easy St"}
I'm making an $http call to my server and I'd like to pass this user info. I'm trying like this:
$http({
url: '/api/coolLookup/' + userID,
method: "GET",
params: {user:$scope.user}
}).success(function(data){
// do stuff
});
Within my server resource (I'm using ExpressJS
/Node
here) I'm trying to access the user
object but cannot:
exports.coolLookup = function (req, res) {
console.log("Here's the user")
console.log(req.params.user)
}
req.params.user
returns undefined in my console. Any idea what to do here?