My goal is to create an http post method in the service that gets the following parameters from the controller: id, firstname,lastname,email,phonenumber ,in the controller:
function updateClient(client){
var clientId=client.id;
var firstName=$("#clientFirstName");
var lastName=$("#clientLastName");
var email=$("#clientEmail");
var phoneNumber=$("#clientPhoneNumber");
updateClient.postClient().then(function(data) {
});
}
and in the service:
testProjectApp.factory('updateClient', function($http, $q) {
return { ...