0
私はui-select angleを使用しています。選択するにはnull値のオプションが必要です。グーグルがそれに合った解決策を見つけることはできません。ui-select angle need null値を持つ選択可能なオプション
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<ui-select allow-clear ng-model="hotelsCtrl.companySelectedInsert" theme="bootstrap">
<ui-select-match placeholder="Select or search company in the list...">{{$select.selected.name}}</ui-select-match>
<ui-select-choices repeat="company in hotelsCtrl.companies | filter: $select.search">
<span ng-bind-html="company.name | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
これをチェック企業= [{name: 'none'、value:null}]; 私はこれを私のホテルCtlに追加しました。しかし、まだ動作しません。 – Senpuki
は 'hotelsCtrl.companies'の配列のサンプル要素を表示します – Miqe
配列は空です。私はデータベースから私の会社を得ています。 – Senpuki