title: Angularjs + Symfony2 routing can't make it work
body: <p>I've been learning AngularJS and I'd like to integrate it with my SF2 back end.
  I'm getting confuse with the routes let's see what I have:</p>
  
  <p>When we go onto /usermanager the symfony routing system opens a controller that loads a twig template. In this template, I load all the js components needed for angular and do this:</p>
  
  <pre><code> {% extends '::base.html.twig' %}
  
   {% block javascripts %}
      {{ parent() }}
  
      &lt;script type="text/javascript" src="{{ asset('js/UserManager_Angular.js')}}"&gt;&lt;/script&gt;
   {% endblock %}
  
  
   {% block body %}
  
  
  &lt;h1&gt;User Manager&lt;/h1&gt;
  
  &lt;div data-ng-view&gt;&lt;/div&gt;
   {% endblock %}
  </code></pre>
  
  <p>Now this is my angular code:</p>
  
  <pre><code>   var UserManager = angular.module('UserManager', ['ngRoute','ngResource']);
  
  UserManager.config(function($routeProvider){
     $routeProvider 
     .when('/addnew',
     {
         controller:'addNewController',
         templateUrl:Routing.generate('_UserManager_add_new_user')
     })
     .when('/',
     {
         controller:'UserManagerHome',
         templateUrl:Routing.generate('_UserManager_getUser_List')
     })
  
  });
  
  UserManager.factory('data_access',['$resource', 
      function($resource){
      return $resource(Routing.generate('_UserManager_getUserList'),{},{
          query:{method:'GET',isArray:true}
      });
  
  }]);
  
  UserManager.controller('UserManagerHome',function ($scope,data_access){
      $scope.users = data_access.query();    
      //$scope.orderProp = 'id';
  
  });
  </code></pre>
  
  <p>ps: as you can see I use the FOSBundle for js route exposure. I think I got how to use that, because my factory correctly gets the users from the database.</p>
  
  <p>So I want to load a file containing the classic angular stuff such as <code>ng-repeat</code> etc. This is represented by this route:</p>
  
  <pre><code>.when('/usermanager',
  {
      controller:'UserManagerHome',
      templateUrl:Routing.generate('_UserManager_userList')
  })
  </code></pre>
  
  <p>Here is my routing file:</p>
  
  <pre><code>_UserManager:
    pattern: /usermanager
    defaults: {_controller: AcmeBundle:UserManager:Home }
    options:
      expose: true
  
  _UserManager_getUser_List:
    pattern: /usermanagerlist
    defaults: {_controller: NRtworksSubscriptionBundle:UserManager:list }
    options:
      expose: true  
  
  _UserManager_getUserList:
    pattern: /usermanager/getuserlist
    defaults: {_controller: AcmeBundle:UserManager:getUserList }
    options:
      expose: true
    requirements:
      _format: json
      _method: GET    
  
  
  _UserManager_add_new_user:
    pattern: /usermanager/addnew
    defaults : {_controller: AcmeBundle:AddNewUser:Home }
    options:
       expose: true
  </code></pre>
  
  <p>ps2: the controllers are almost empty, just rendering the twig template i'm looking for.</p>
  
  <p>Currently, when I open <code>/usermanager</code> I get a blank page with just the title "user manager". What do I do wrong ?</p>