I am new to Angular and facing a challenge. I have an input field set as read only using ng-readonly. There is also a button that, when clicked, triggers a javascript function called openPopup. This function opens a popup where a selection can be made, and upon clicking ok, the main page should display the selected value in the readOnly input text.
My issue lies in capturing the event when the text changes in the input field, reading that value, and then taking action within Angular.
Despite the text field value changing, the corresponding ng-model data.currentLot remains unchanged. I have tried using ng-change, $apply, $watch, onchange event, but none of these solutions seem to work. Is there a simple step that I am overlooking?
<div class="form-group">
<input type="text" ng-readonly="'true'" ng-model="data.currentLot" class="form-control" id="chooseLotId" placeholder="">
<button type="submit" class="btn btn-default" onclick="openPopup('chooseLotId', false);">Search Lots</button>