It works so far that Angular can make a POST request to my local running Apache server. From that 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 am stuck with the fact that it only returns []
. If I return a hardcoded associative array, it works.
What could be the problem? (plugin)