javascript - False the value except the selected radio button using AngularJS -


i using radio button within angular page. radio button under ng-repeat. want check radio default json data true. if 1 radio checked, change remaining data false. done it. radio button not checked in ui.

here fiddle link

i hope understand , need.

change $scope.setchoiceforquestion to:

$scope.setchoiceforquestion = function (q, c) {            angular.foreach(q, function (r) {         if(c != r)         r.isuseranswer = false;     }); }; 

and should work.


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -