angular-ui/bootstrap — pull request #2962 by miiihi (2014-11-13 16:03:26+00:00)
Title: feat(typeahead): access to $item in typeahead-input-formatter and item resolver

This solves problems with input formatting and initialization. IMO it fixes https://github.com/angular-ui/bootstrap/issues/981, https://github.com/angular-ui/bootstrap/issues/274...

In short, we add access to $item in formatter, if we have an item, if we don't (ie. on initialization and programaticaly setting value), we use callback for item resolving and rerun formatters, when callback returns.