how to put param(body) in restangular?


I have api that required parameter in body, so I need to put that values in restangular, I have tried this

function deleteAccount(){
        {id : accountIdDelete},
        var index = vm.account.indexOf(accountIdDelete);
        if (index > -1) vm.account.splice(index, 1);

What I’m trying is basicly tried to delete the data using id, I need that data Id put it in body request so that the api can detect select the data and delete it. but the code above that doesn’t pass the value to the server? is there any way to put request body in restangular?


Based on my knowledge and searching on the internet, NgResource and restangular doesnt’ support to set body into delete request, the only support for POST request to put data into the body, Correct me if I’m wrong but this is based on this answer :

Answered By – Gujarat Santana

Answer Checked By – Mildred Charles (AngularFixing Admin)

Leave a Reply

Your email address will not be published.