问题
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")
来源:https://stackoverflow.com/questions/25757547/angularjs-xeditable-typeahead-update-input-field-based-on-another-input-field