我想顯示{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將是一個不錯的選擇 –