1
I have the following code:
$http.post('data.php').success(function(data) {
return data;
}).error(function(data) {
console.log(data);
});
How to handle data from this request?
I’m doing it this way:
var data = $scope.get_notas();
But when will I use the variable date she returns to me Undefined
Why don’t you just use the code on
success
? For exampleconsole.log(data)
instead ofreturn data;
– Sergio