How can I capture the "updater" event from the AngularUI UI Bootstrap directive?
I defined my HTML:
<input type="text" pattern="[0-9]*" class="span6" placeholder="8675309" ng-model="empid" typeahead="entry for entry in httpEmpIdSearch($viewValue, 8)">
... and my related function:
$scope.httpEmpIdSearch = function(query, limit) { return $http.get( '/visitorLog/api/v1/employee/?limit=' + limit + '&empid__startswith=' + query ).then(function(response) { output = []; angular.forEach(response.data.objects, function(value, key) { this.push(value.bems.toString()); }, output); return output; }); }
I would like to take additional steps (autocomplete form) when the user clicks on the ID in the pop-up window. If raw Bootstrap I would use "updater":
$('#sampleElement').typeahead({ minLength: 3, source: function (query, process) {
I tried different listeners like:
$scope.$on('typeahead-updated', function(event) { ... }
But I can not afford to capture such an event. Is there a way that I can perform additional actions after selecting the typeahead option?
source share