title: MongoDB is posting no data with Mongoose
body: <p>I am making an app with the MEAN stack and I am having trouble POSTing data to my database. When I push the submit button, the form data is being cleared, like it is supposed to when the POST is sucessful, but when I go to the database, there is a new document with nothing in it but and id and __v.</p>
  
  <p>There aren't any errors that are being thrown because there is data being posted to the DB, but not the correct data (Look at the mongodb document at the bottom of the page)</p>
  
  <p>The form where the data is being posted to is this:</p>
  
  <pre><code>&lt;input name="userName" type="String" class="form-control" id="userName" ng-model="formData.userName" placeholder="Your Name"&gt;
        &lt;input name="game" type="String" class="form-control" id="game" ng-model="formData.game" placeholder="The game?"&gt;
        &lt;input name="userPoint" type="Number" class="form-control" id="userPoint" ng-model="formData.userPoint" placeholder="Points?"&gt;
        &lt;button type="submit" class="btn btn-default" ng-click="createScore()"&gt;Submit&lt;/button&gt;
  </code></pre>
  
  <p>This is createScore():</p>
  
  <pre><code>$http.post('/api/scores', $scope.formData)
                          .success(function(data) {
                              $scope.formData = {};
                              $scope.scores = data;
                              console.log(data);
                          })
                          .error(function(data) {
                              console.log('Error: ' + data);
                          });
  </code></pre>
  
  <p>This is the Mongoose model for the database:</p>
  
  <pre><code>var Score = mongoose.model("Score", {
      userName: String,
      game: String,
      userPoint: Number
  }, "score");
  </code></pre>
  
  <p>And this is the route for my express's "app.post()":</p>
  
  <pre><code>app.post("/api/scores", function(req, res){
      Score.create({
          userName:req.body.userName,
          game:req.body.game,
          userPoint:req.body.userPoint
      }, function(err, score) {
              if (err)
                  res.send(err);
  
              Score.find(function(err, score) {
                  if (err)
                      res.send(err)
                  res.json(score);
              });
          });
  });
  </code></pre>
  
  <p>When the data is POSTed, the mongodb file document looks like this:</p>
  
  <pre><code>{
      "_id": {
          "$oid": "54cbf3d1fbaaf10300000001"
      },
      "__v": 0
  }
  </code></pre>
  
  <p>I was thinking that maybe the names were wrong (ex. userPoints and userPoint), but I made sue that they were all the same. Also, I'm new to this, so if you have any tutorials that might help concrete a topic, please feel free to share.</p>
  
  <p><strong>EDIT 1:</strong> 
  <br>
  I did a console.log() on the node.js part where it says req.body.userName, req.body.game, etc. And in the logs, they all came out as undefined. I have been looking for a solution online, but I can't seem to find a solution. I have tried making the types in the HTML file "String" instead of "text", but that did not seem to work. Any ideas?</p>