2017-09-20 2 views
0

라디오 버튼이 탭에 집중하게하고 각도 2에서 엔터를 클릭하면 어떻게 선택됩니까?라디오 버튼 포커스가 typescript/angular2

<div class="radio-group-container"> 
    <md-radio-group class="radio-group" [(ngModel)]="choice" tabIndex="11" (click)="radioClick()" disableRipple> 
     <md-radio-button class="radio-button" *ngFor="let choice of choices" [value]="choice" tabIndex="13" disableRipple>{{choice}}</md-radio-button> 
    </md-radio-group> 
</div> 

답변

0

사용 된 모든 라디오 버튼은 코드에서 동일한 tabIndex를 사용합니다.

<md-radio-button class="radio-button" *ngFor="let choice of choices; let i=index" [value]="choice" tabIndex="index" disableRipple>{{choice}}</md-radio-button> 
+0

으로 바꾸십시오. tabindex가 11에서 시작해야한다면 어떻게 색인을 초기화 할 수 있습니까? – user3579341

+0

라디오 버튼에 tabindex 작업을 할 수 없었지만 로직에 따라 tabIndex = "11 + index"가 작동해야한다고 생각합니다. – Vega

관련 문제