typeahead multiline列出项目

时间:2014-09-17 16:15:17

标签: css angularjs twitter-bootstrap

我使用的是使用twitter bootstrap和angularjs的typeahead。显示自动填充建议,如下面的屏幕截图所示。但我想在不同的行显示大城市名称。例如伦敦Harrow of Harrow两行使用twitter bootstrap typehead。如何为了实现这一点,任何帮助都是可以理解的,我正在使用http://angular-ui.github.io/bootstrap/

enter image description here

2 个答案:

答案 0 :(得分:1)

只需输入一个< br>标记您希望换行的位置。

答案 1 :(得分:0)

您可以为此使用模板

<input id="id" type="text" name="name" ng-model="binding" typeahead-min-length="0" uib-typeahead="x as x.name for xyz in alphabet" typeahead-popup-template-url="url/to/template" typeahead-editable="false" autocomplete="off" typeahead-on-select="yourMethodCall()" ng-change="yourMethodCall()">

在您的模板文件中,即some_template.html

<div class="design class" aria-hidden="{{!isOpen()}}">
    <div class="container" ng-repeat="match in matches">
      <div> your design here... </div>
  </div>
</div>

繁荣就完成了

相关问题