I\'m trying to implement a typeahead in Angular using http://angular-ui.github.io/bootstrap/, where the typeahead field displays full addresses but once clicked another fiel
@pkozlowski-opensource 's great solution has one drawback: you can't initialise the typeahead from the ng-model property in this way, at least if you want it to display the item's description and not its code.
I found a way to solve this by configuring the typeahead like this:
This returns a state object to the model property which can be initialised by setting the value to the appropriate object:
$scope.selected = {postcode:'M1',address:'Manchester'};
Working fiddle here: https://jsfiddle.net/0y3ntj4x/3/
I think this scenario is missing from the angular-bootstrap documentation for the typeahead.