title: AngularJS uncheck radio button
body: <p>I have tried to look at other solutions for this with ng-dblclick, $event etc but none of them seems to works for me.</p>
  
  <p>I have two radio buttons inside a ng-repeat in a table. I have one field for setting which radio button should be active. This works fine with just ng-change but I want to be able to deselect any of the radio buttons aswell. </p>
  
  <p>Ng-change doesn't fire on this so I added one for ng-click aswell and the messy code under works but is it any cleaner way of doing this?</p>
  
  <pre><code>&lt;td&gt;
      &lt;div class="inline-group"&gt;
          &lt;label class="radio"&gt;
              &lt;input type="radio" name="stage{{$index}}" ng-change="save(item, false)" ng-click="save(item, true)" ng-model="item.Stage" value="Started"&gt;
              &lt;i&gt;&lt;/i&gt; Started
          &lt;/label&gt;
          &lt;label class="radio"&gt;
              &lt;input type="radio" name="stage{{$index}}" ng-change="save(item, false)" ng-click="save(item, true)" ng-model="item.Stage" value="Completed"&gt;
              &lt;i&gt;&lt;/i&gt; Completed
          &lt;/label&gt;
      &lt;/div&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>var runOnce = false;
  
  $scope.save = function (item, uncheck) {
      if (runOnce) {
          return;
      }
  
      if (uncheck) {
          item.stage = null;
      }
      else {
          runOnce = true;
      }
  
      ...
      .$promise.then(function (result) {
          ...
          runOnce = false;
          ...
       });
      ...
  </code></pre>