0

How can input and appear automatically in the text which is matching on some sorts on history drop down list, which means autocomplete during input, I used class="dropdown-menu", it can just appear the input history, but it can not appear automatically during inputting like according to alphabetical sort? how can I use typeahead in my list example?

<div class="input-group-btn">
    <input type="text" class="form-control dropdown-toggle" ng-model="search.searchboxinput" data-toggle="dropdown" 
        aria-haspopup="true" aria-expanded="false"  placeholder="Enter search" style="width: 400px"/
    <ul class="dropdown-menu">
        <li ng-repeat="r in search.history">
            <a href="#" ng-click="search.setHistory(r)">{{r}}</a>
        </li>
    </ul>
</div>
Jamesjin
  • 371
  • 2
  • 6
  • 15
  • 1
    Please re-read your question and try to compose it in proper English. It is not clear what you mean. Do you mean autocomplete? http://stackoverflow.com/questions/18460374/angularjs-autocomplete-from-http – mplungjan Jul 11 '16 at 08:05
  • Thank you. yeah, it should mean autocomplete, but it is using class="dropdown-menu", I am not sure if autocomplete can work? – Jamesjin Jul 11 '16 at 08:10
  • Please see the link I added. Is that what you meant? – mplungjan Jul 11 '16 at 08:38
  • @mplungjan . thanks a lot, I believe typeahead is very useful and can help, can you tell me how to use it in above html? I already download ui-bootstrap-tpls-1.3.3.min.js – Jamesjin Jul 11 '16 at 10:02
  • Sorry, I do not use bootstrap – mplungjan Jul 11 '16 at 10:03

0 Answers0