Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 605 Bytes

README.md

File metadata and controls

20 lines (16 loc) · 605 Bytes

ionic-autocomplete

Directive for text input autocomplete for Ionic framework

Usage

Add the attribute 'ionic-autocomplete' with passing an object that contains the items and a callback function for handling the select event to the input

<input type="text" ng-model="search" ionic-autocomplet="{item: myItems, onSelect: doSomthing}" />

the callback is called when the user selects an item from the autocomplete list

.controller('MyCtrl', function($scope){
  $scope.doSomthing = function(item) {
    console.log('The selected item is: '+item);
  }
});