sn0opr / ionic-autocomplete

Directive for text input autocomplete for Ionic framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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);
  }
});

About

Directive for text input autocomplete for Ionic framework


Languages

Language:JavaScript 84.1%Language:CSS 15.9%Language:HTML 0.0%