rest api with symfony2 and angular.js