-->

angularjs xeditable typeahead - update input field

2019-08-15 07:09发布

问题:

I was using angularjs xeditable typeahead. Tried to updatae an input field based on another input field value but was not able to. I updated the $scope but xeditable did not bind the value to the html input field.

回答1:

I managed to solve my problem by using e-typeahead-on-select to call function when user made a selection and updating the input field using angular.element

e-typeahead-on-select="onSelectAction($item, $model, $label)"

angular.element($('input[name="myInputName'"]')).val("myInputValue")