1
Ich habe $ scope.todos und in meinem Controller den Code für das Einreichen
$scope.submitChanges = function() {
var todos = $resource("/todo");
//code goes here for sending variable
}
Und ich möchte es Knoten senden. js, die es dauert, wie:
router.post("/",function(req, res) {
var collection = db.get("todo");
collection.insert({ /* here comes the data to insert */ }, function(err, todos) {
if(err) throw err;
res.json(todos);
})
})
können wir diese mit $ Ressource nicht statt $ http. Danke .. – SaiUnique
ja Sie müssen dies mit $ Ressource –
überprüfen aktualisierte Antwort –