I am trying to return the output of my service below to controller's calling variable "response". The service does gets called and it also have an output however it never gets back to my calling again. What Am i doing wrong here?
this.AssociatetoJob1 = function (application) {
var config = {
headers: {
'contentType': 'application/json; charset=utf-8;'
}
};
return $http.post('/api/Application/AddApplication',
JSON.stringify(application), config).then(function (result) {
return result.data;
});
}
And below is the line from my calling Controller:
var response = CandidateService.AssociatetoJob1(appInfom);