title: HTTP POST is submitting empty JSON array
body: <pre><code>$scope.submitBracket = function(item, event){
      console.log("submitting form");
      var jsonData = '{"userEmail" : "darwood@mail.com","brackets" :' +     JSON.stringify($scope.allGames) + '}';
      var testJSON = {"Hello": {"id": "file", "value": "WTF"}};
      console.log(jsonData);
      var responsePromise = $http.post("/api/brackets", jsonData, {});
      responsePromise.success(function(dataFromServer,status,headers,config){
      console.log(dataFromServer);
  });
  responsePromise.error(function(data,status,headers,config){
      console.log(data);
      });
  
  }
  </code></pre>
  
  <p>I am working on a MEAN stack app which has a form submitting a JSON object to MongoDB. the JSON is valid. It can be submitted to the database manually with no problems. In the above code example I can see the object being output to the console right before being sent to the db via an HTTP post that is the handed off to an express route. Oddly, I had it working and then in testing removed the records from the db to enter new ones and it started submitting a JSON object with an empty array. Sometimes it throws an "empty response message but the POST request does get a 200 response back. I can't for the life of me figure out why the data is not being passed. </p>
  
  <p>If also tried this alternative function on the Angular side to send the data:</p>
  
  <pre><code>$scope.createBracket = function() {
  var jsonData = '{"userEmail" : "darwood@mail.com","brackets" :' +     JSON.stringify($scope.allGames) + '}';
      $http.post('/api/brackets', jsonData)
          .success(function(data) {
          $scope.brackets = data;
          $location.path('/');
      })
      .error(function(data) {
          console.log('Error: ' + data);
      });
  </code></pre>
  
  <p>};</p>
  
  <p>This is the express route that it is passed off to. </p>
  
  <pre><code>app.post('/api/brackets', function(req, res) {
  
      // create a Bracket
      Bracket.create({
          text : req.body.text,
          done : false
      }, function(err, Bracket) {
          if (err)
              res.send(err);
  
      });
  
  });
  </code></pre>
  
  <p>when using Postman to test with raw JSON. It hangs for a long time and says that the request is pending. This code was modeled after the tutorial found here </p>
  
  <p><a href="http://scotch.io/tutorials/javascript/creating-a-single-page-todo-app-with-node-and-angular" rel="nofollow">http://scotch.io/tutorials/javascript/creating-a-single-page-todo-app-with-node-and-angular</a></p>
  
  <p>I have this sample code up and running and inserting into my database with no problem. </p>
  
  <p>Stumped I am. Any help would be appreciated. Thanks. </p>