I have a function like this:
$scope.GetDays = function() {
$http.post("core/ajax/LoadDays.php").success(function(data){
return data[0].days;
});
};
And in LoadDays.php I have this json:
[{"days":"1"}]
If I do console log It will return correct: 1. But, the problema is When I call it on my HTML code. I recive a looping erros : $rootScope:infdig
How can I do this?
Sorry for my english