HTML radio button.
<input type="radio" ng:model="..." value="..." [name="..."] [ng:change="..."]>
ng:model – {string} –
Assignable angular expression to data-bind to.
value – {string} –
The value to which the expression should be set when selected.
name(optional) – {string} –
Property name of the form under which the widgets is published.
ng:change(optional) – {string} –
Angular expression to be executed when input changes due to user interaction with the input element.
<script> function Ctrl() { this.color = 'blue'; } </script> <div ng:controller="Ctrl"> <form name="myForm"> <input type="radio" ng:model="color" value="red"> Red <br/> <input type="radio" ng:model="color" value="green"> Green <br/> <input type="radio" ng:model="color" value="blue"> Blue <br/> </form> <tt>color = {{color}}</tt><br/> </div>
it('should change state', function() { expect(binding('color')).toEqual('blue'); input('color').select('red'); expect(binding('color')).toEqual('red'); });