需要使用引导程序来构建动态搜索框的帮助

问题描述 投票:0回答:1

我目前正在Servicenow Serivce门户中工作,该门户支持Angular

我能够使用引导程序创建搜索框,如下所示:

 <select class="mdb-select md-form" searchable="Search here..">
  <option value="" disabled selected>Choose your country</option>
  <option value="1">USA</option>
  <option value="2">Germany</option>
  <option value="3">France</option>
  <option value="3">Poland</option>
  <option value="3">Japan</option>
</select>

这给出正确的结果。但是我从服务器提取要在每次更新时动态设置的国家/地区名称,结果可能会更改。我可以按如下所示的顺序接收国家/地区名称:泰国,中国,印度,新加坡

任何人都可以帮助我如何在选择框中设置所有国家/地区名称吗?

html css angularjs angular-ui-bootstrap servicenow
1个回答
0
投票
**<select class="selectpicker" data-live-search="true">
  <option data-tokens="ketchup mustard">Hot Dog, Fries and a Soda</option>
  <option data-tokens="mustard">Burger, Shake and a Smile</option>
  <option data-tokens="frosting">Sugar, Spice and all things nice</option>
</select>**

这里是一个例子。https://developer.snapappointments.com/bootstrap-select/examples/这里是不同的

© www.soinside.com 2019 - 2024. All rights reserved.