title: AngularJs: How to set radio button checked based on model
body: <p>I have a model returning in the storeLocations object with a isDefault value. if isDefault returns true, I wan't to set that radio button in the group as checked.</p>
  
  <p>Not sure if I need to do a $each(data, function(index,value) and iterate through each object returned or if there's an easier way to do this using angular constructs.</p>
  
  <p>Object:</p>
  
  <pre><code>storeLocations = [
   {
    ... more values,
    isDefault: true
   }
  ]
  </code></pre>
  
  <p>Markup:</p>
  
  <pre><code>    &lt;tr ng-repeat="location in merchant.storeLocations"&gt;
          &lt;td&gt;{{location.name}}&lt;/td&gt;
          &lt;td&gt;{{location.address.address1}}&lt;/td&gt;
          &lt;td&gt;{{location.address.address2}}&lt;/td&gt;
          &lt;td&gt;{{location.address.city}}&lt;/td&gt;
          &lt;td&gt;{{location.address.stateProvince}}&lt;/td&gt;
          &lt;td&gt;{{location.address.postalCode}}&lt;/td&gt;
          &lt;td&gt;{{location.address.country}}&lt;/td&gt;
          &lt;td&gt;{{location.website}}&lt;/td&gt;
          &lt;td&gt;{{location.zone}}&lt;/td&gt;
          &lt;td&gt;&lt;input type="radio" ng-model="location.isDefault" value="{{location.isDefault}}" name="isDefault_group"&gt;&lt;/td&gt;
  </code></pre>