I have been having trouble accessing the data that is passed to express.js from angular http service.
I am using the http service :
$http.post('/someUrl', data, config).then(successCallback, errorCallback);
This is what I am doing in angular:
$http.post('/api/topic', {data : topic}).then(successCallback, errorCallback);
This is what I am doing on in express:
app.post('/api/topic', function(req,res){console.log(req.data);});
We are assuming the topic is an object recieved from angular's frontend.
{
username : 'dan',
topic : 'I want to learn more',
description : 'Where can I learn more about web development',
category : 'web development'
}
So my question is : How does the backend end using express access the angular http data field?