I'm just trying to make a simple trick, but can't find a solution. I'm sending a post request from angular.js app, using $http method. Everything I want it's to be redirected to twig template, where post data will be parsed. I was trying $this->redirect, $this->render
, or
/**
* @Route("/print/quote")
*
* @param Request $request
* @return Response
*/
public function printQuoteAction(Request $request)
{
return $this->redirect($this->generateUrl('printQuotAction', array(
'data' => $request->request->all()
)));
}
but this not working for me, what can I do?
Also, I was trying to
return $this->render('PTHearingBundle:Print:quote.html.twig', array(
'data' => $request->request->all()
));
And its really renders a page, but returning html markup as response, but I want to be redirected to this page.