0
I am trying to get a return json of the function and associate it to a variable, because so I take the need to structure the received data with page from within this function and I can work in another function this, but it is not working out the return is being undefined
, see the code
var token = getCookie("token");
var json = {};
$scope.query = consumeService (token, JSON.stringify(json), "funcionario/getAllFuncionarios", "POST", "alerta", function(result){
var r = result;
return r;
});
console.log("Query :" +$scope.query);
See if this answer helps you: http://answall.com/questions/92779/uma-function-n%C3%A3o-recognizes-a-outra/92781#92781
– David
I tried here and it didn’t work
– Victor Siqueira