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

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Add class to another page attribute using URL id - Jquery -