function changeSelectedButton(parent, increment) {
    // Coerce all child radio buttons into an array, then wrap then in an iterator
    var buttons = $mdUtil.iterator(parent[0].querySelectorAll('md-radio-button'), true);

    if (buttons.count()) {
      var validate = function (button) {
        // If disabled, then NOT valid
        return !angular.element(button).attr("disabled");
      };

      var selected = parent[0].querySelector('md-radio-button.md-checked');
      var target = buttons[increment < 0 ? 'previous' : 'next'](selected, validate) || buttons.first();

      // Activate radioButton's click listener (triggerHandler won't create a real click event)
      angular.element(target).triggerHandler('click');
    }
  }
function changeSelectedButton(parent, increment) {
    // Coerce all child radio buttons into an array, then wrap then in an iterator
    var buttons = $mdUtil.iterator(parent[0].querySelectorAll('md-radio-button'), true);

    if (buttons.count()) {
      var validate = function (button) {
        // If disabled, then NOT valid
        return !angular.element(button).attr("disabled");
      };

      var selected = parent[0].querySelector('md-radio-button.md-checked');
      var target = buttons[increment < 0 ? 'previous' : 'next'](selected, validate) || buttons.first();

      // Activate radioButton's click listener (triggerHandler won't create a real click event)
      angular.element(target).triggerHandler('click');
    }
  }
function changeSelectedButton ( parent , increment ) { // Coerce all child radio buttons into an array, then wrap then in an iterator var buttons = $mdUtil . iterator ( parent [ 0 ] . querySelectorAll ( 'md-radio-button' ) , true ) ; if ( buttons . count ( ) ) { var validate = function ( button ) { // If disabled, then NOT valid return ! angular . element ( button ) . attr ( "disabled" ) ; } ; var selected = parent [ 0 ] . querySelector ( 'md-radio-button.md-checked' ) ; var target = buttons [ increment < 0 ? 'previous' : 'next' ] ( selected , validate ) || buttons . first ( ) ; // Activate radioButton's click listener (triggerHandler won't create a real click event) angular . element ( target ) . triggerHandler ( 'click' ) ; } }
Change the radio group's selected button by a given increment.
If no button is selected, select the first button.
Change the radio group s selected button by a given increment . If no button is selected select the first button .
Change the selected button