How to do grouping of results drop-down list on typehead?

In the previous issue, I pulled the results from the two sources and displays them in the drop-down list. Now faced with another problem, without it meaning the implementation of such a dropdown list is lost.
Now I can't do the grouping drop-down list, here U4cUwye.png

The drop-down list of customer done in angular ui-select, and a list of the addresses made on the typeheadas ui-select before initialization loads the data, it did not come to me.
Typehead solves all my problems, but only in the no group. The documentation describes the options in the typeahead-template-url and typeahead-popup-template-url, if you want to use the display.
Here also is an example of realizations of the groups on the basis of these parameters.

But, I couldn't still realize it.

Here is my markup
<div class="form-group">
 <input type="text" ng-disabled="order.client === null" ng-model="order.direction.from" placeholder="Enter the feed address..." uib-typeahead=" for address in getTarifZones($viewValue)" typeahead-loading="loadingLocationsFrom" typeahead-no-results="noResultsFrom" typeahead-editable="true" class="form-control">
 <i ng-show="loadingLocationsFrom" class="glyphicon glyphicon-refresh"></i>
 <div ng-show="noResultsFrom">
 <i class="glyphicon glyphicon-remove"></i> Nothing was found

Any ideas?
July 9th 19 at 13:21

Find more questions by tags Angular