hi 

    im trying to delete the element which is present in nodejs array. but 
id of that element is not passing to server side through angular js. Below 
is my code pls help me.


Node js Code:

      app.delete('/api/student/:student_id/exam/:exam_id/properties', 
function(req, res){
        console.log(req.body);
        if(req.params.student_id) {
                for(i=0; i<property.length; i++) {
                        if(property[i].id == req.body.id){
                                property.splice(i,1);
                        break;
                        }
                }
   }
   res.send({"ok": true})
})



Angularjs Controller function:


      $scope.deleteprop = function(propid){
        $scope.id = propid;
        console.log($scope.id);
        var uri = $filter('getById')($scope.property, 
$scope.selected_property);
        uri.$delete({student_id: 
$routeParams.student_id,exam_id:$routeParams.uri_id},{id: $scope.id }, 
function(){
        loadDataNew();
        })
    }


in this $scope.id is not passing to nodejs side.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to