我一直在使用这个线程来指导我使用出色的 typeahead 指令。
但是我有点卡住了。我需要将样式应用于结果中的一个属性。
我plunker
这里有一个。
我的问题是我真的不明白如何将一个类应用于结果末尾显示的 supervisor.address 属性。
HTML
在下面。
<div class="container-fluid" ng-controller="TypeaheadCtrl">
<div>Selected: <span>{{selected}}</span></div>
<div><input type="text" ng-model="selected" typeahead="supervisor as supervisor.firstname +' '+supervisor.surname+''+' ('+supervisor.address+')' for supervisor in supervisors | filter:{firstname: $viewValue}:startsWith | limitTo: 8" typeahead-template-url="itemTpl.html"></div>
</div>