title: how to select one primary contact on listing of contacts in ng-repeat by radio button
body: <p>I have list of contacts and repeating with ng-repeat how to make one primary contact by selecting radio button .</p>
  
  <pre><code>&lt;div class="col-sm-12" ng-repeat='contact in acc.contacts'&gt;
  
      &lt;div class="col-xs-2" ng-class="{'error':(sub &amp;&amp; !contact.isPrimary)}"&gt;
          &lt;input type="radio" name='isPrimary' ng-model='contact.isPrimary' ng-value="true"&gt;
      &lt;/div&gt;
  
      &lt;div class="col-xs-2" ng-class="{'error':(sub &amp;&amp; !contact.name)}"&gt;
          &lt;input type="text"  ng-model='contact.name'&gt;
      &lt;/div&gt;
  
  &lt;/div&gt;                
  &lt;/div&gt;
  </code></pre>
  
  <p>my json is look like </p>
  
  <pre><code>{
      "contacts": [
          {
              "isPrimary": false,
              "name": null,
          },
          {
               "isPrimary": false,
               "name": null
          },
          {
               "isPrimary": false,
               "name": null
          ]
     }
  </code></pre>
  
  <p>i want isPrimary should be true for one , but it does not set false when radio button got deselected </p>