I am trying to set up a form, with some radio buttons and a textarea for custom input. If I select custom input, and start typing it loses the radio selection and I must select the custom input again when I am done typing
http://jsbin.com/AMAniXu/2/edit
How can I ensure that selecting the radio next to the textarea and providing custom input maintains user selection?
Use a different model object other than the object used in the ng-value
of the checkbox
<input type="radio" data-ng-model="selectedEntry" data-ng-value="newText">
<textarea rows="4" cols="40" data-ng-model="newTextInput"></textarea>
And then you can grab the value in the model newTextInput
when you click the submit button if the third one is selected.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다