Javascript 角度ui在下拉列表中选择不加载大列表
这是我的世界城市json文件: 这是我的html代码:Javascript 角度ui在下拉列表中选择不加载大列表,javascript,angularjs,json,ui-select,angular-ui-select,Javascript,Angularjs,Json,Ui Select,Angular Ui Select,这是我的世界城市json文件: 这是我的html代码: <div class="form-group"> <label class="control-label"> CITY </label> <ui-select name="city" ng-model="myModel.city" theme="selectize" > <ui-select-match placeholder="{
<div class="form-group">
<label class="control-label">
CITY
</label>
<ui-select name="city" ng-model="myModel.city" theme="selectize" >
<ui-select-match placeholder="{{ 'placeholders.project.city' | translate }}">
{{$select.selected}}
</ui-select-match>
<ui-select-choices repeat="r in selectedcity | filter: $select.search">
<div ng-bind-html="r | highlight: $select.search"></div>
</ui-select-choices>
</ui-select>
</div>
为什么一些国家的名单没有加载?json文件有问题吗?还是因为一些国家有一个庞大的城市名单?是因为它超过了ui选择限制吗?
有些国家/地区加载列表,而有些国家/地区不加载,列表为空。您必须将视图限制为一个较小的数字才能获得良好的性能,例如| limito:10:
你能提供一个JSFIDLE和你的代码吗。谢谢
<ui-select-choices repeat="r in selectedcity | filter: $select.search | limitTo: 10">