Native AngularJS (Angular) directives for auto complete.
npm install angularjs-auto-complete.
bower install angularjs-auto-complete.
<ng-auto-complete auto-options="options" auto-select="selectItem" auto-key="text" auto-change="changeInputVal(val)"> </ng-auto-complete>
angular.module('app', ['ng.autocomplete']);
app.controller('MainCtrl', ['$scope',
function ($scope) {<br/>
$scope.options = [{text:'text1',id:1,val:1},{text:'text2',id:2,val:2}];<br/>
$scope.selectItem = $scope.options[0]<br/>
$scope.changeInputVal = function(val){<br/>
//filter data with val<br/>
$scope.$apply(function(){<br/>
$scope.options = _filterData;<br/>
})<br/>
}<br/>
$scope.saveData = function(){<br/>
//$scope.selectItem will change when select change<br/>
}<br/>
}<br/>
]);
autoOptions:The option's array.
autoSelect:The selected item will set to this field.
autoKey:The option's field that use to display on the input.
autoChange:The changeInputVal Fun will trigger when input value change,and it can use to filter options by input key.