這是我的看法離子如何在Ionic視圖中創建和檢索ng-repeat中的ng-model值?
<div class="divTable" ng-repeat="quest in Questions" >
<div class="divTableBody">
<div class="divTableRow">
<div class="divTableCell" ><strong>{{quest.no}}.</strong></div>
<div class="divTableCell" style="width:100%"><strong>{{quest.question}}</strong></div>
</div>
<div class="divTableRow" ng-repeat="choice in quest.jawaban" >
<div class="divTableCell"> </div>
<div class="divTableCell"><input type="radio" ng-value="'{{choice.jawaban}}'" name="{{quest.no}}" id="{{choice.jawaban}}"><label for="{{choice.jawaban}}">{{choice.jawaban}}</label></div>
</div>
<br>
</div>
</div>
如何獲得控制單選按鈕值..?
謝謝
你可以更新你的控制器,json數據並提及ng-model的值 – Dhaarani