I\'m trying to setup a typeahead
using AngularJS & UI Bootstrap like so:
.html
Sure thing :-)
The typeahead directive from http://angular-ui.github.io/bootstrap/ uses the same super-flexible syntax as the AngularJS select directive for ng-options
. So you could write:
typeahead="stuff as stuff.name for stuff in stuffs | filter:$viewValue"
Here is a working plunk: http://plnkr.co/edit/5kGZkNPZ7rIFfb4Rvxej?p=preview
I had the same problem. I have solved it by
typeahead="country.name for country in countryList | filter:$viewValue | limitTo:8"
here countryList is a list of country object. name is one of property of country object. For me it is working fine.