How to pass $scope variables into the Node.js server using $resource
<p>I have $scope.todos and in my controller the code for submitting that is</p>

<pre><code>$scope.submitChanges = function() {
    var todos = $resource("/todo");

    //code goes here for sending variable
}
</code></pre>

<p>And I want to send it to Node.js , which takes it as  :</p>

<pre><code>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);
    })
})
</code></pre>