私は指令を持っていて、角度ui先頭を使用しています。 myModel
には2ウェイバインディングがあります。コントローラのmyModel
の値を更新し、myModelの値が変わるたびにtypeahead-on-select
をトリガーしたいと思います。Angular UI Typeahead - ng-modelが更新されたときにtypeahead-on-selectをトリガーします
<input type="text" ng-model="myModel" placeholder="Locations loaded via $http" uib-typeahead="address for address in getLocation($viewValue)" typeahead-loading="loadingLocations" typeahead-no-results="noResults" class="form-control" typeahead-on-select="myFunc()">
myModel
値が更新されるとだから私はmyFunc()
を実行する必要があります。これを行う方法は?