angular-ui/bootstrap — pull request #58 by pkozlowski-opensource (2013-01-08 14:06:22+00:00)
Title: typeahead WIP - DO NOT MERGE

So, yesterday we've got this very nice PR for the typeahead:
https://github.com/angular-ui/bootstrap/pull/57

Unfortunately the approach in the above PR, while simple and nice, is limiting as we've got the input filed in a template. So I've spent some time trying to see how easy / hard is to hack something. This PR is the result of this hacking.

The code is absolutely horrible at the moment but seems to be working quite nicely:
http://ci.angularjs.org/job/angularui-bootstrap/ws/dist/index.html#/typeahead

This is not meant to be merged as-is but rather serve as a base for discussion. Actually I was surprised how easy and fast is to hack something together. I think that the complete, cleaned up version would end up < 150 LOC and be very, very flexible. To compare, the bootstrap's JavaScript alone has > 320 LOC. The AngularJS version could easily have the same functionality using existing filters and on top of this be fully customizable (template).