Reputation: 266
I am new to ionic
, I have started creating application on it. For last few days, I have been searching for autocomplete
in ionic. I found a codepan but it's not that simple one. I need autocomplete just like JqueryUI
provides.
Upvotes: 2
Views: 8134
Reputation: 3809
If you are using Ionic 2+ and Angular 2+ then I recommend ionic4-auto-complete.
See a demo here.
Upvotes: 1
Reputation: 719
You can try with this.
npm install -g bower
Then, run this on the project root:
bower install ionic-autocomplete
Add this attribute on the view
<input type="text" ng-model="search" ionic-autocomplet="{item:myItems, onSelect: doSomthing}" />
And finally, add this to your controller:
.controller('MyCtrl', function($scope){
$scope.doSomthing = function(item) {
console.log('The selected item is: '+item);
}
});
Reference : Bower library
Github : Example on Github
I hope this helps.
Upvotes: 0
Reputation: 1097
If you want an autocomplete like bootstrap typehead instead modal autocomplete of Guylabs you have allmighty-autocomplete. It is for angular, but I forked it and made some changes to fit it in Ionic.
Works fine but there is one issue if you put before a text input in a form. You can see that issue here: Clicks on div over an input in Ionic
Upvotes: 1
Reputation: 8325
There is a cool directive
, Uptil now it's acceptable solution with 155 *s on github repo, try it:
Ionic directive - Autocomplete
Ionic directive - Autocomplete Website
Upvotes: 3