My typeahead feature currently filters based on a person's name only. However, my person object contains additional fields such as surname, and I would like the filter to work based on both name and surname.
Here is the existing typeahead code using angular-ui-bootstrap:
<input type="text" id="friendInput" placeholder="Friend's name"
typeahead="friend for friend in friendsList | filter:{name:$viewValue}"
typeahead-template-url="friendDropdown.html" ng-model="chosenFriend" />
I have attempted to modify the filter section of the typeahead attribute without success. Can you provide guidance on how to achieve this correctly?