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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -