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 - MPAndroidChart - How to add Annotations or images to the chart -

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

firefox - Where is 'webgl.osmesalib' parameter? -