I have created a service with RESTAngular in order to ease my communication with my REST API. Let's say that i have an object Person.
Here is my service:
myApp.factory('RESTService', [ 'Restangular', function (Restangular) {
    var restAngular = Restangular.withConfig(function (Configurer) {
        Configurer.setBaseUrl('/myAPI/');
    });
    var service = {};
    service.Person= restAngular.service('person');
    return service;
}]);
I can successfully:
GET the list of Person
RESTService.Person.getList().then(function (response) {
   $scope.persons = response.plain();
})
GET one Person
RESTService.Person.one(id).get().then(function (response) {
    $scope.person = response.plain();
})
POST (Update) Person
RESTService.Person.post($scope.person).then(
                function (successResponse) {
                      // success stuff
                },
                function (errorResponse) {
                    console.log("fail", errorResponse.status);
                }
            )
But i can't do PUT (create a new record). Now let's say i have a form and the form's data is being kept in $scope.formData. I want to do make a PUT request passing the object contained in $scope.formData to my API. How do i do that?
EDIT: For clarification my API is REST, so i do
- GET - /myAPI/personto get the list of all the persons
- GET - /myAPI/person/123to get the person with id=123
- POST - /myAPI/person/123to update the person with id=123
- PUT - /myAPI/personto insert a new person in my database
 
     
    