AngularJS required radio buttons needs two click events to be valid

angularjs

Solution

Try adding the ng-click attribute to your radio button input.

Credit to Manny D for noting this first. Yes, this is a little hackish, but it works. E.g.,

<input type="radio" 
       name="groupName"  
       ng-model="editObject.Property"                             
       ng-value="someValue"
       ng-click />

Problem

I have a very simple form where a radio button is required to be selected in order for a form to be valid. The radio buttons are generated by `ngRepeat`. As you can see from this fiddle, while the desired behavior is that when the radio button is clicked for the first time, that should validate the form (being the only element), however notice that it takes an additional click (on the same radio button or any other) to validate the form: http://jsfiddle.net/Xsk5X/3/ What am I missing?

Original source

Related problems