I have a function that looks like this:
$scope.GetDays = function() {
$http.post("core/ajax/LoadDays.php").success(function(data){
return data[0].days;
});
};
Within LoadDays.php, the json is as follows:
[{"days":"1"}]
When I console log it, the correct value of 1 is returned. However, I encounter a looping error ($rootScope:infdig) when I call it in my HTML code.
Any suggestions on how to resolve this issue?
Please excuse any language errors.