我对angular-ui-select有问题。
当它关闭时,它看起来像这样
但是当它打开时,占位符不显示,它看起来像这样:
这是我的代码:
<ui-select ng-model="selected.address" style="width: 50%;">
<ui-select-match>
<span ng-bind="$select.selected.description"></span>
</ui-select-match>
<ion-list ui-select-choices refresh="getPlaces()" refresh-delay="10" repeat="item in places track by item.id">
<ion-item class="item-icon-left">
<i class="icon icon-left ion-android-compass"></i>
<h3 ng-bind="item.address"></h3>
</ion-item>
</ion-list>
</ui-select>
注1:我从服务器获取数据,可能会显示很多字段。
注2:我正在使用'selectize'主题,因为我无法在我的Ionic应用程序中使用Bootstrap
您对此为何发生以及如何解决有任何建议吗?
编辑:第二张图片中的“活动标签就在那里,因为下拉列表会在下一个字段中显示,这里没什么大不了的。
答案 0 :(得分:0)
您需要启用enableSearch。这应该会占用占位符。
$scope.enableSearch = function () {
$scope.searchEnabled = true;
};