title: angularjs how can i post my form into the json
body: <p>I am building my first angular app and looking to post my form into my JSON data.</p>
  
  <p>This is my form:</p>
  
  <pre><code>  &lt;span ng-show="show"&gt;
    &lt;form name="inputForm" class="form-group" ng-controller="FormController as autoctrl"  ng-submit="inputForm.$valid &amp;&amp; autoctrl.addGegevens(gegeven)" novalidate&gt;
    &lt;br&gt;
  
    &lt;p&gt; Type: &lt;input type="text" name="type" ng-model="type" style="margin-left:52px; padding-left:5px;  width:165px;" minlength="2" maxlength="10" required /&gt;&lt;/p&gt;
  
    &lt;p&gt;Bouwjaar: &lt;input type="number" name="bouwjaar" ng-model="bouwjaar"  style="margin-left:22px; padding-left:5px;  width:165px;" minlength="4" maxlength="4" required /&gt;&lt;/p&gt;
  
    &lt;p&gt;Km: &lt;input type="number" name="km" ng-model="km" style="margin-left:60px; padding-left:5px;  width:165px;" minlength="2" maxlength="6" required /&gt;&lt;/p&gt;
  
    &lt;p&gt;Brandstof:  &lt;input id="select" name="brandstof" ng-model="brandstof" style="margin-left:20px; padding-left:5px;" minlength="3" maxlength="7" required/&gt;&lt;/p&gt;
  
    &lt;p&gt;Kenteken: &lt;input type="text" name="kenteken" ng-model="kenteken" style="margin-left:22px; padding-left:5px; width:165px;" minlength="6" maxlength="9" required /&gt;&lt;/p&gt;
  
    &lt;p&gt;Datum:  &lt;input type="text" name="datum" ng-model="datum"  style="margin-left:40px; padding-left:5px;  width:165px;" minlength="3" maxlength="11" required  /&gt;&lt;/p&gt;
  
    &lt;p&gt;checked: &lt;input type="checkbox"  name="checked" ng-model="checked" style="margin-left:28px;" required /&gt;&lt;/p&gt;
  
     &lt;br&gt;
     &lt;button class="btn btn-primary" type="submit"    value="submit"&gt;Toevoegen&lt;/button&gt;
  
     &lt;div&gt;{{inputForm.$valid}}&lt;/div&gt;
  
  
    &lt;/form&gt;
    &lt;/span&gt;
  </code></pre>
  
  <p>And this is my app.js:</p>
  
  <pre><code>(function(){
  var volkswagenApp = angular.module('volkswagenapp',[]);
  
  
   volkswagenApp.controller('VolkswagenCtrl', [ '$http' ,       function($http){
           var vw =  this;
           vw.gegevens = [];
           $http.get('autos.json').success(function(data){
           vw.gegevens = data;
           });
  
  
  
          }]);
  
          volkswagenApp.controller('FormController',function(){
             this.gegevens={};
            /* this.addGegevens = function(gegeven) {
              gegeven.gegevens.push(this.gegeven);
              this.gegevens={};
             }*/
  
             this.addGegevens = function(gegeven){
              this.gegevens.datum = Date.now();
              vw.gegevens.push(this.gegeven);
              this.gegeven = {};
             }
  
  
                  });
  
                  })();
  </code></pre>
  
  <p>Can somebody tell me where I am going wrong? I did the same steps as they do on codeschool.</p>