src/components/tabs/js/tabsController.js
function select (index, canSkipClick) {
    if (!locked) ctrl.focusIndex = ctrl.selectedIndex = index;
    // skip the click event if noSelectClick is enabled
    if (canSkipClick && ctrl.noSelectClick) return;
    // nextTick is required to prevent errors in user-defined click events
    $mdUtil.nextTick(function () {
      ctrl.tabs[ index ].element.triggerHandler('click');
    }, false);
  }
function select (index, canSkipClick) {
    if (!locked) ctrl.focusIndex = ctrl.selectedIndex = index;
    // skip the click event if noSelectClick is enabled
    if (canSkipClick && ctrl.noSelectClick) return;
    // nextTick is required to prevent errors in user-defined click events
    $mdUtil.nextTick(function () {
      ctrl.tabs[ index ].element.triggerHandler('click');
    }, false);
  }
function select ( index , canSkipClick ) { if ( ! locked ) ctrl . focusIndex = ctrl . selectedIndex = index ; // skip the click event if noSelectClick is enabled if ( canSkipClick && ctrl . noSelectClick ) return ; // nextTick is required to prevent errors in user-defined click events $mdUtil . nextTick ( function ( ) { ctrl . tabs [ index ] . element . triggerHandler ( 'click' ) ; } , false ) ; }
Update the selected index. Triggers a click event on the original `md-tab` element in order
to fire user-added click events if canSkipClick or `md-no-select-click` are false.
@param index
@param canSkipClick Optionally allow not firing the click event if `md-no-select-click` is also true.
Update the selected index . Triggers a click event on the original md - tab element in order to fire user - added click events if canSkipClick or md - no - select - click are false .