我想显示{country flag图标+名称+电话拨号代码}的列表,我已经使用ui选择实现这在角度,这是我已经使用的代码角度ui选择与图像
<ui-select ng-model="viewModel.homePhoneCountryCode" theme="bootstrap" id="homePhoneCountryCode" name="homePhoneCountryCode" ng-disabled="disabled">
<ui-select-match>
{{$select.selected.phoneCode}}
</ui-select-match>
<ui-select-choices repeat="country in countries | filter: $select.search">
<img ng-src="{{country.imageUrl}}" />
<span ng-bind-html="country.name | highlight: $select.search"></span>
<span ng-bind-html="country.phoneCode | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
的列表显示了罚款,除非似乎有一些性能问题,当点击列表中选择一个选项,它不是单独的第一次,有一个滞后,但在随后的点击,以及即使图像正在被浏览器缓存。
有大约在列表中的标志图标从http://www.famfamfam.com/lab/icons/flags/ 236项,面积
另一个问题相对较小的是,在当文本输入到搜索/过滤器输入时间的页面似乎被卡住并带有一条消息,表明长时间运行js是原因。
问题1:这是在列表中显示远程图像的正确方法。
问题2:在ui-select中是否有延迟加载的方法。
问题3:如果这是与ui-select有关的问题,那么我还有另外一个可以探索的方法。
嗯是刚刚遇到该链接,似乎移动到https://github.com/machineboy2045/angular-selectize将是一个不错的选择 –