angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.27k stars 6.73k forks source link

Is it possible use typeahead with $q.all? #6361

Closed prochafilho closed 7 years ago

prochafilho commented 7 years ago

The issues forum is NOT for support requests. It is for bugs and feature requests only. Please read https://github.com/angular-ui/bootstrap/blob/master/CONTRIBUTING.md and search existing issues (both open and closed) prior to opening any new issue and ensure you follow the instructions therein.

Bug description:

The typeahead directive works great when binding the results to a single promise to be resolved. Is it possible to bind the results to a the return value of calling a promise with $q.all?

Link to minimally-working plunker that reproduces the issue:

http://plnkr.co/edit/7pVvfp1SSeOBkMKnU9Fv?p=preview

Version of Angular, UIBS, and Bootstrap

Angular: 1.5.9 UIBS: 2.3.0 Bootstrap: 3.0.0

wesleycho commented 7 years ago

As to how Typeahead works, it requires a promise - the function can return a $q.all promise if you want, it has no real opinions other than it needs a single promise.