title: AngularJS checkbox model value is undefined
body: <p>I have a problem where I'm attempting to post the value of a checkbox in my model to the server and as the checkbox has not been interacted with on the form, angular seems to have not assigned it a value, when I ask for the value of the checkbox it comes back as undefined.</p>
  
  <p>Here is my markup:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;input id="templateDisable" type="checkbox" ng-model="template.disabled" /&gt;
      &lt;label for="templateDisable"&gt;Disabled&lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And here's a reduced version of my save action on my controller:</p>
  
  <pre><code>$scope.save = function (form) {
      if (form.$valid) {
          var formData = new FormData();
          // this is the problem line of code
          formData.append("disabled", $scope.template.disabled);
          // ... some other stuff
      }
  };
  </code></pre>
  
  <p>Actually, ticking then unticking the checkbox before I hit the save action results in the template.disabled property being false, which is what I would have expected without any manual intervention.</p>
  
  <p>I've seen other related questions, e.g. <a href="https://stackoverflow.com/questions/18850918/angularjs-initial-checkbox-value-not-in-model">AngularJS: Initial checkbox value not in model</a> but surely stuff like a simple checkbox should be baked in? I shouldn't have to be writing directives to manage checkboxes surely?</p>