Html AngularJS:当没有匹配项时,更改Angular所选插件的占位符文本
正如您从标题中看到的,我试图更改占位符文本,该文本显示“无结果匹配”,并且从所选标记中灰显(禁用) 我试过使用“占位符”,但不起作用Html AngularJS:当没有匹配项时,更改Angular所选插件的占位符文本,html,angularjs,angular-chosen,Html,Angularjs,Angular Chosen,正如您从标题中看到的,我试图更改占位符文本,该文本显示“无结果匹配”,并且从所选标记中灰显(禁用) 我试过使用“占位符”,但不起作用 <div> <select chosen disable-search="true" id="newpaymentMethod" placeholder="Placeholder text" class="easytrade-input full-width" name="newpaymen
<div>
<select chosen disable-search="true" id="newpaymentMethod"
placeholder="Placeholder text"
class="easytrade-input full-width" name="newpaymentMethod"
ng-model="vm.newRecord.paymentMethod"
ng-options="paymentMethod.type as paymentMethod.description
for paymentMethod in vm.paymentMethodOptions"
required>
</select>
</div>
然后我尝试了“无结果文本”,仍然不起作用
<div>
<select chosen disable-search="true" id="newpaymentMethod"
no_results_text="Placeholder test"
class="easytrade-input full-width" name="newpaymentMethod"
ng-model="vm.newRecord.paymentMethod"
ng-options="paymentMethod.type as paymentMethod.description
for paymentMethod in vm.paymentMethodOptions"
required>
</select>
</div>
你知道吗?
谢谢在我查看了的GitHub文档之后,我发现了如何使用“no_result_text” 请参阅下面的代码:
<div>
<select chosen disable-search="true" id="newpaymentMethod"
no-results-text="'Placeholder test'"
class="easytrade-input full-width" name="newpaymentMethod"
ng-model="vm.newRecord.paymentMethod"
ng-options="paymentMethod.type as paymentMethod.description
for paymentMethod in vm.paymentMethodOptions"
required>
</select>
</div>
因此,您必须使用“无结果文本”而不是“无结果文本”,并且文本应以“”换行,如下面的“'text here'”
希望能帮助别人我的答案:)