angular.module.ng.$compileProvider.directive.input.radio

Description

HTML radio button.

Usage

<input type="radio"
       ng-model="{string}"
       value="{string}"
       [name="{string}"]
       [ng-change="{string}"]>

Parameters

Example

 <script>
   function Ctrl($scope) {
     $scope.color = 'blue';
   }
 </script>
 <form name="myForm" ng-controller="Ctrl">
   <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/>
   <tt>color = {{color}}</tt><br/>
  </form>
  it('should change state', function() {
    expect(binding('color')).toEqual('blue');

    input('color').select('red');
    expect(binding('color')).toEqual('red');
  });