Example Symfony and AngularJS apps demonstrating qandidate/symfony-json-request-transformer
PHP JavaScript
Switch branches/tags
Nothing to show
Clone or download
Latest commit 98048e2 Aug 13, 2014
Permalink
Failed to load latest commit information.
app initial commit Aug 13, 2014
src/Qandidate/DemoBundle initial commit Aug 13, 2014
web initial commit Aug 13, 2014
.bowerrc initial commit Aug 13, 2014
.gitignore initial commit Aug 13, 2014
README.md initial commit Aug 13, 2014
bower.json initial commit Aug 13, 2014
composer.json initial commit Aug 13, 2014

README.md

symfony-json-request-transformer-example

Example Symfony and AngularJS demonstrating qandidate/symfony-json-request-transformer

Install

  1. Clone this repository.
  2. Run composer install
  3. Run bower install
  4. Run app/console server:run --env=dev -vvv to start the server

Example

Point your browser to http://localhost:8000/angular.html

You will see the AngularJS app performing two requests. One is a GET request, the other a POST request. In the DefaultController you will see the JSON POST request is automatically decoded and its properties are easily accessible in the Request object.

The magic happens in the JsonRequestTransformerListener which is tagged as a kernel.event_listener in services.xml