Answer the question
In order to leave comments, you need to log in
How to get from symfony2 in angular?
Hello.
I usually receive data:
$em = $this->getDoctrine()->getManager();
$result = $em->getRepository('CustomEmployeeBundle:Employee')->findByLastName($last_name);
return new Response(json_encode($result), 200);
$http.get("/employee/search/"+$scope.last_name).success(function (data) {
$scope.results = data;
console.log($scope.results);
});
Answer the question
In order to leave comments, you need to log in
return new Response(json_encode($result), 200);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question