1
我在多個下拉菜單中使用AngularStrap的Typeahead指令,有時顯示值顯示爲選定值。AngularStrap Typeahead隨機選擇顯示值而不是模型值
例如,如果我只想在輸入字段中顯示數字作爲選定值,有時候會同時選擇數字和說明。這裏是相關的代碼:
<input type="text" class="form-control"
bs-typeahead
bs-options="x.num as (x.num > 0 ? x.num + '. ' + x.Description : '')for x
in crc.xList | orderBy: 'x.num'"
data-autoSelect="true"
data-limit="15"
ng-model="crc.newNum"
ng-model-options="{ debounce: 500 }"
ng-change="crc.getNumInfo(false, true)" />
任何幫助將不勝感激 - 謝謝!
我試過你的建議,但那不是 - 仍然看到問題。 –