I have the following Angular UI-Bootstrap typeahead working great:
<input class="span2" type="text" ng-model="selectedStuff" typeahead="stuff as stuff.name for stuff in stuffs | filter:$viewValue"/>
Though, it's almost working too great. I'm able to display the stuffs.name
for the purposes of the typeahead
AND select the full stuff
object in stuffs
. The problem is that my $viewValue
is matching all of the properties in stuff
instead of just the stuff.name
. I've tried adding the .name
to various places in the typeahead
with no luck. Is there a straightforward way to display and match only the .name
but still return the entire object?