我想找到一種方法來清除代碼的ui選擇選擇。如何以編程方式清除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>
欲碰杯上清除按鈕並清除一些輸入,包括UI的選擇。 清除ui-select的代碼是什麼?
這是有道理的,但我已經嘗試過,並沒有工作。 奇怪的是我把一個
@vagelis我做了編輯。你可以試試我的建議,並告訴我它是否有效? –
@AbdellahAlaoui你的建議可以解決這個問題。 – Kof