Typeahead using object name

前端 未结 2 767
耶瑟儿~
耶瑟儿~ 2020-12-30 06:19

I\'m trying to setup a typeahead using AngularJS & UI Bootstrap like so:

.html



        
2条回答
  •  一生所求
    2020-12-30 06:39

    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.

提交回复
热议问题