I created uib-typeahead dropdown in my angularJs app. i display two attribute in uib-typeahead dropdown. i call API based on first name and api give response with object. i print first name and last name in dropdown. First name and last name. but it is display in one line.
<input class="form-control" type="text" ng-model="name" placeholder="Search name"
uib-typeahead="name as name.firstName + ' ' + name.lastName for a in searchByName($viewValue)"
typeahead-on-select='onSelectName($item)'>
it is shows fname and lname in one line. but i want to break last name and print below of first name. how can i break in uib-typeahead?
Instead of using the uib-typeahead to show the property name in the select, you can pass a html template, with it you can define wherever you want.
You can see more in the documentation: https://angular-ui.github.io/bootstrap/#!#typeahead