I have a text box and two radio button controls with yes or no value. If I click on Yes
, the text box should be enable and it should be disabled on No
selection. I have used ng-disabled property.
But, if user selects No
, saves the file and reopens it, the text box is getting enabled again. Is there a way to save the text box state?
I have tried using disabled=""
on textbox
. but if user selects yes, enters some value and saves the files, the textbox
is getting disabled again. if user selects Yes
, the textbox
should not be disabled till he selects No
I am talking about index.html
file.
Below is my chunk of code:
<input type="radio" name="something" value="1" ng-model="checkboxSelection"/>Checkbox 1 <input type="radio" name="something" value="2" ng-model="checkboxSelection"/> Checkbox 2 <input type="text" ng-model="somevalue" name="somevalue" ng-disabled="checkboxSelection=='2'"/>