title: How to select and deselect the radio button in Typescript AngularJS
body: <p>How to select and deselect the radio button in angular?</p>
  
  <p>I have tried  the below sample in Typescript angular but no luck. Is there anyway to implement the same.</p>
  
  <p>Problem was scope false is not updating when the condition is true.</p>
  
  <p><a href="http://jsfiddle.net/cksanjose/67joun8s/" rel="nofollow noreferrer">http://jsfiddle.net/cksanjose/67joun8s/</a></p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div&gt;
      &lt;label class="radio-inline"&gt;&lt;input type="radio" value="500"  id="csRdoIntendYes" ng-model="vm.checked" name="optradio1" ng-click="vm.uncheck($event)" &gt;Yes&lt;/label&gt;
      &lt;label class="radio-inline"&gt;&lt;input type="radio" value="1000" id="csRdoIntendNo"  ng-model="vm.checked" name="optradio2" ng-click="vm.uncheck($event)" &gt;No&lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Typescript</strong></p>
  
  <pre><code>uncheck = function (event) {          
      if (this.checked == event.target.value) this.checked = false;           
  }
  </code></pre>