title: Angular.js: get post-data in $_POST variable
body: <p>I'm quite new to angular.js. Now I try to post some data to a PHP-Script.</p>
  
  <p><strong>angular.js:</strong></p>
  
  <pre><code>var app = angular.module('app', []);
  app.controller('sendData', function($scope, $http) {
      $http.post("script.php", {'value': 'one'} )
      .success(function (response) {
          console.log(response);
      });
  });
  </code></pre>
  
  <p><strong>PHP:</strong></p>
  
  <pre><code>$data = json_decode(file_get_contents("php://input"));
  </code></pre>
  
  <p>So I would get the data in <code>$data-&gt;value</code>.</p>
  
  <p>Is it possible to modify the script (without using $.param of JQuery), so I could access the post-data with <code>$_POST['value']</code> - as I would normally do that in PHP?</p>