title: Adding hidden form field to array in Angular
body: <p>I am trying to add a "hidden" field to a basic form in Angular (using Firebase as the backend). I'm having trouble figuring out how to include this field as part of the array when the form is submitted. I want to include <code>{type: 'Basic'}</code> as part of the array. I've looked at the other related posts on this site, but am still unsure how to apply to my particular situation. </p>
  
  <p>Any suggestions on how to do this? </p>
  
  <p>Javascript:</p>
  
  <pre><code>myApp.controller('NewProjectCtrl', function ($location, Projects) {
  var editProject = this;
  editProject.type = 'Basic';  //this is the hidden field
  editProject.save = function () {
  
      Projects.$add(editProject.project).then(function(data) {
          $location.path('/');
      });
  };
  });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form&gt;
     &lt;div class="control-group form-group"&gt;
       &lt;label&gt;Name&lt;/label&gt;
       &lt;input type="text" name="name" ng-model="editProject.project.name"&gt;
     &lt;/div&gt;
     &lt;label&gt;Description&lt;/label&gt;
     &lt;textarea name="description" class="form-control" ng-model="editProject.project.description"&gt;&lt;/textarea&gt;
     &lt;button ng-click="editProject.save()" class="btn btn-primary"&gt;Save&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>