I need the logic to correctly save or update (POST) a set of records. Using this resource that calls the database.
TripResource.updateTrip = function(id,ship){
return $http.put(URL + '/trips'+'/'+id, trip);
// .success(function(data, status, headers, config){
// })
};
I understand that you would have to put in a function in the controller, for that function to put it in the Save button in a ng-click ... But the function expects an id and a trip with the info of the whole object . I also know that I have to declare an empty object like:
$scope.updateTrip={};
But how are the form values sent to that object?