I recently developed a typeahead feature using the angular-ui library.
Here is the current HTML for my typeahead:
<input name="customers" id="customers" type="text" placeholder="enter a customer" ng-model="selectedCustomer" uib-typeahead="customer.firstName for customer in customers | filter: $viewValue | limitTo:8" class="form-control" typeahead-editable="false">
While the typeahead search functionality is working fine, I am now faced with the task of retrieving all fields associated with the selected customer once they are chosen. The typeahead results are stored in a property called $scope.customers in my controller, which is populated through an ajax call to the API fetching all customers' data.
Could someone please advise on how I can retrieve all fields related to the selected customer upon selection?
Thank you!