2016-08-17 81 views
1

參考該stackoverflow問題必需修改用於使用UI選

上述批准或清理plunker angular-ui-select with images

不與角1.5.8工作角選擇與 - 圖像。

<!DOCTYPE html> 
<html lang="en" ng-app="demo"> 
<head> 
    <meta charset="utf-8"> 
    <title>AngularJS ui-select</title> 

    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.js"></script> 
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular-sanitize.js"></script> 

    <!-- ui-select files --> 
    <script src="select.js"></script> 
    <link rel="stylesheet" href="select.css"> 

    <script src="demo.js"></script> 

    <!-- Select2 theme --> 
    <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/select2/3.4.5/select2.css"> 


    <style> 
    .select2-search { 
     display: none; 
    } 
    </style> 
</head> 

<body ng-controller="DemoCtrl"> 

    <h3>Select2 theme</h3> 
    <p>Selected: {{language.selected}}</p> 
    <ui-select ng-model="language.selected" theme="select2" ng-disabled="disabled" style="min-width: 300px;"> 
    <ui-select-match placeholder="Select a language"><img ng-src="{{ $select.selected.url }}" /> {{$select.selected.name}}</ui-select-match> 
    <ui-select-choices repeat="lang in language_list"> 
     <img ng-src="{{ lang.url }}" /> 
     <div ng-bind-html="lang.name" style="display: inline"></div> 
    </ui-select-choices> 
    </ui-select> 

</body> 
</html> 

我得到下面的錯誤代碼。

Error: [ui.select:transcluded] Expected 1 .ui-select-match but got '0'. uishttp://run.plnkr.co/yRjubgwevxwjLaQD/select.js:118:12

有人可以幫忙..

回答

1

所有的源文件已經更新到最新版本已經解決了我的問題。