Reputation: 778
Has anyone been successfully able to use the Allmighty Autocomplete in their ionic app?
https://github.com/JustGoscha/allmighty-autocomplete
Below is the use case I am trying to solve for:
I have a form where I am asking the user to select their country and then based on that the cities selection will be offered. Since there are 195 countries, the Select option is not a very realistic option. I have looked at the several autocomplete solutions for ionic as well as angularjs. Most of them have a search box with filter set up. This also includes https://github.com/guylabs/ion-autocomplete
Allmighty Autocomplete is the closet one i came to but it doesn't work. I see {{attrs.placeholder}} but when i start typing it doesn't do anything.
Upvotes: 0
Views: 356
Reputation: 719
You can try with this
npm install -g bower
bower install ionic-autocomplete
<input type="text" ng-model="search" ionic-autocomplet="{item:myItems, onSelect: doSomthing}" />
.controller('MyCtrl', function($scope){ $scope.doSomthing = function(item) { console.log('The selected item is: '+item); } });
Reference : Bower library
Example : Github
I hope this helps
Upvotes: 2
Reputation: 778
The github example source code has a factory that needed to be loaded.
Upvotes: 0