コードでui-selectの選択をクリアする方法を探したいと思います。例えばui-selectをプログラムでクリアする方法は?
私は次のコード
<ui-select ng-model="selectedCustomerCode" ng-if="CustomerIds.length>1" on-select="CustomerCodeFiltersOnSelectCallback($item, $model)" theme="bootstrap">
<ui-select-match class="ui-select-match" allow-clear="true" placeholder="Επιλογή κωδικού πελάτη...">{{$select.selected.CCode}}</ui-select-match>
<ui-select-choices class="ui-select-choices" repeat="customer in CustomerIds | propsFilter: {CCode: $select.search}">
<div ng-bind-html="customer.CCode | highlight: $select.search"></div>
</ui-select-choices>
</ui-select>
を持っている私は、クリアボタンの上にCLINKとUI選択を含むいくつかの入力をクリアしたいです。 ui-selectをクリアするためのコードは何ですか?
これは意味がありますが私はすでにそれを試して動作しませんでした。 変わったことは私が
@vagelis私は編集を行いました。私の提案を試して、それが動作するか教えてもらえますか? –
@AbdellahAlaouiあなたの提案はこれを解決します。 – Kof