javascript - Need to Uncheck radio with condition using angular JD -
i need uncheck radio button in specific condition.
<input type="radio" name="xxx" value="add" data-ng-model="xxx"/>add
in radio want uncheck when condition attain like
<input type="radio" name="xxx" value="add" data-ng-model="xxx" ng-unchecked="add.new='false'"/>add
is there way can in simple method
as bind input model, whenever uncheck box, model unset , vice versa anyway.
so if model , form in sync anyway, best place realize unset value in controller:
if($scope.add.new) { $scope.xxx = false; }
Comments
Post a Comment