我在兩個收音機組框中的離子當我點擊一組收音機選定的答案保存後點擊第二個收音機組第一選定的收音機被刪除單選按鈕選擇刪除後點擊其他組的收音機
<div ng-app="ionicApp" ng-controller="HomeCtrl" style="padding:25px">
{{question | json }}
<div ng-repeat="q in question" >
<div class="list">
<div class="item item-divider">
{{q.question}}
</div>
<ion-radio ng-repeat="option in q.options" ng-value="option" ng-model="q.answer" >
{{ option }}
</ion-radio>
<br>
</div>
</div>
angular.module('ionicApp', ['ionic'])
.controller('HomeCtrl', function($scope) {
$scope.question =
[
{
"is_radio": true,
"question": "Roughly how much of your profile was spent on digital activities in your last job?",
"options": ["Less than 10%","Less than 25%","Less than 50%","More than 50%"],
"id": "130",
"answer": ""
},
{
"is_radio": true,
"question": "Have you spent more time with B2B or B2C?",
"options": ["B2C","Both","Less than 10%"],
"id": "130",
"answer": ""
}
]
})
一個單選按鈕的功能是隻允許一個選擇你要選擇一個以上的,你應該使用複選框 – GraveyardQueen
一個時間。如果我知道,但有兩種面臨的問題廣播組請查看預覽鏈接 –