【问题标题】:Required modification for angular-select-with-images using ui-select使用 ui-select 对 angular-select-with-images 进行必要的修改
【发布时间】:2016-08-18 12:06:44
【问题描述】:

参考这个stackoverflow问题

以上批准或清理的plunkerangular-ui-select with images

不适用于 Angular 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>

我收到以下错误代码。

错误:[ui.select:transcluded] 应为 1 .ui-select-match 但得到 '0'。 uishttp://run.plnkr.co/yRjubgwevxwjLaQD/select.js:118:12

有人可以帮忙吗..

【问题讨论】:

    标签: angularjs


    【解决方案1】:

    所有源文件都已更新到最新版本解决了我的问题。

    【讨论】:

      猜你喜欢
      • 2018-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-25
      • 2015-05-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多