title: Angular JS and Symfony2
body: <p>I am currently working on a project using Symfony2 and seeking some advice on that. </p>
  
  <p>I am thinking of a hybrid application in two(2) different ways <strong>a)</strong> Login Page shall use traditional form with CRF Token and let symfonty2 handle it. <strong>b)</strong> All Inner pages ( which potentially are modules ) I want them to be non AJAX, but the other activities inside that shall behave like a Single Page. </p>
  
  <p><strong>For example</strong> I have an <strong>employee module</strong>. When user clicks on that it is entirely loaded from Server ( all the templates and forms etc ) now each activity under employee module like <strong>add/update delete/view</strong> etc shall be loaded through AJAX and response to be returned in JSON i.e AngularJS. </p>
  
  <p>I am currently thinking of using <strong>FOSUserBundle</strong> to return html on initial request and then based on request type Accept: application/json it will return the JSON ( remember the add/updat delete/view part? ).</p>
  
  <p>My question is it a better idea to use Angular Partials (html) files or Symfony2 Twig? or would it be better to use Angular JS, but let those partials be rendered by Symfony2 twig? ( I am thinking of Forms here, would want to validate that both from client and server side ) </p>
  
  <p>Has any one been through similar problem, if yes then what approach was used to develop HYBRID application using <strong>AngularJS and Symfony2</strong> or any other framework? any relevant ideas are appreciated.</p>