【问题标题】:calling an angular function when an option is selected from list从列表中选择选项时调用角度函数
【发布时间】:2025-11-25 19:15:01
【问题描述】:

input type="text" placeholder="" ng-autocomplete ng-keyup="addDeliveryAreas($event)" ng-model="deliveryareas.search" details="details" options="options"

我正在使用 ng-autocomplete 指令。 https://github.com/wpalahnuk/ngAutocomplete 从选项列表中选择地址时,我想调用角度函数

【问题讨论】:

    标签: angularjs onmouseclick


    【解决方案1】:

    只需使用 ng-change 指令。 angular doc 每次 ng-model 发生更改时,您将绑定到它的函数都会被调用。

    【讨论】:

      【解决方案2】:

      我尝试了几件事.. ngblur="myfunction()" 适用于我的用例

      【讨论】: