My Document in MongoDb looks like:
{
"_id" : ObjectId("5550e710dad47584cbfe9da1"),
"name" : "Serverraum1",
"tables" : [
{
"name" : "Table1",
"nummer" : "1",
"reihe" : "2",
}
]
}
Post Method:
app.post('/serverraeume', function (req, res) {
console.log(req.body);
db.serverraeume.update(req.body, function (req, res) {
});
});
and the http post in angular controller:
$scope.addSchrank = function (serverraum){
$http.post('/serverraeume', $scope.table);
}
I want to update in the Document Serverraum1 tables. How can i push $scope.table in tables?
console.log(req.body)
? – chridam May 12 '15 at 7:43