I am presenting a problem at the front level when making a request to a REST webservice, with the POST method, by clicking on the button, it is executed successfully, I get the response from the api, the same answer must show me a DIV with the message of "successful registration", I made a debug, and in effect the response travels to the point where it should show the message, but it does not, it is as if the view was not built, it should be highlighted that if I give two clicks to the button next if the message appears on the front
here is my code in the controller
insertFactByCategory.insertFacts(data,$rootScope)
.success(function(success){
console.log(success);
vm.validateMessage(success);
})
.error(function(error){
console.log(error);
});
code in the factory service in angular
function insertFacts(data,$rootScope){
return $.ajax({
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
url: $rootScope.domainUrlHebdoConf+'/semana/insert/category',
method: "POST",
data: data
});
I remain attentive to your comments and / or suggestions