title: angularjs checkbox checked if model evaluates to true
body: <p>How do I define a checkbox in an angular form that is checked when the model evaluates to true (anything like "yes", "1", 1,...) and is unchecked when the model evaluates to false ("0", 0, undefined, ...)? I get the data from a rest service and the represantation of true and false can vary.
  If the user changes the value in the form it should be set to "1" (on) or "0" (off). If he changes it again it should be set to it's original value and marked as unchanged.
  I'd like to write markup like:</p>
  
  <pre><code>&lt;input type="checkbox" ng-model="value1" my-custom-directive&gt;
  &lt;input type="checkbox" ng-model="value2" my-custom-directive&gt;
  </code></pre>