title: AngularJS - Binding radio buttons to models with boolean values
body: <p>I am having a problem binding radio buttons to an object whose properties have boolean values. I am trying to display exam questions retrieved from a $resource.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;label data-ng-repeat="choice in question.choices"&gt;
    &lt;input type="radio" name="response" data-ng-model="choice.isUserAnswer" value="true" /&gt;
    {{choice.text}}
  &lt;/label&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$scope.question = {
      questionText: "This is a test question.",
      choices: [{
              id: 1,
              text: "Choice 1",
              isUserAnswer: false
          }, {
              id: 2,
              text: "Choice 2",
              isUserAnswer: true
          }, {
              id: 3,
              text: "Choice 3",
              isUserAnswer: false
          }]
  };   
  </code></pre>
  
  <p>With this example object, the "isUserAnswer: true" property does not cause the radio button to be selected. If I encapsulate the boolean values in quotes, it works.</p>
  
  <p>JS:</p>
  
  <pre><code>$scope.question = {
      questionText: "This is a test question.",
      choices: [{
              id: 1,
              text: "Choice 1",
              isUserAnswer: "false"
          }, {
              id: 2,
              text: "Choice 2",
              isUserAnswer: "true"
          }, {
              id: 3,
              text: "Choice 3",
              isUserAnswer: "false"
          }]
  };   
  </code></pre>
  
  <p>Unfortunately my REST service treats that property as a boolean and it will be difficult to change the JSON serialization to encapsulate those values in quotes. Is there another way to set up the model binding without changing the structure of my model?</p>
  
  <p><a href="http://jsfiddle.net/hgxjv/1/">Here's the jsFiddle showing non-working and working objects</a></p>