I'm trying to get a json to return the function and associate it with a variable, so I take the need to structure the data received with the page from within that function and I can work on another function, but it's not working. 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);