angular-ui/bootstrap — pull request #147 by pkozlowski-opensource (2013-02-16 18:57:47+00:00)
Title: feat(typeahead): add the typeahead directive

After a lengthy discussion in https://github.com/angular-ui/bootstrap/issues/114 and several options for the syntax here is the finished PR for the typeahead directive.

The current version uses the same interface as the original one which works but feels very non-AngularJS. I was toying with different ideas but the only other thing that kind of made sense was string=based syntax similar to the one used by the `select` directive. The problem with this is that select's syntax is not very intuitive either.

The other issue is that atm I'm using unsafe binding of HTML (to support matches highlighting). This is definitively not something I would like to do but for me this is one more evidence that we need `ngSanitize`

Anyway, the current version supports _all_ the bootstrap's options so if anyone has an idea of a better syntax we can (easily?) change things. It also has integration with `$q` so functions going for matchers can be async!