It works so far that Angular can make a POST request on my local Apache server. From this server, I return a Symfony JsonResponse object:
$http.post("/api", {"foo":"bar"}) .success(function(data, status, headers, config) { $scope.data = data; console.log(data); }).error(function(data, status, headers, config) { $scope.status = status; });
Now I'm stuck in that it only returns [] . If I return a hard-coded associative array, it works.
What could be the problem? ( plugin )
source share