[英]Angularjs ui-select Dynamic object mapping inside repeat
我的ui-select指令代碼在下面正常工作。 在重復中,我需要將CODE對象(即ID)的屬性設置為動態代碼[fwValueProperty] 。 據我所知,這不是ng-repeat,所以我不能將其用作代碼[fwValueProperty]。 我怎樣才能做到這一點?
<div>
<ui-select name="{{fwName}}"
id="{{fwId}}"
theme="bootstrap"
ng-model="fwValue"
reset-search-input="false"
append-to-body="true"
search-enabled="true"
on-select="onSelected(fwValue)">
<ui-select-match placeholder="Seçiniz..."><span ng-bind="$select.selected[fwDescriptionProperty]"></span> </ui-select-match>
<ui-select-choices repeat="code.ID as code in fwCodes | propsFilter: { '{{fwDescriptionProperty}}': $select.search} track by $index"
refresh-delay="0">
<div ng-bind-html="code[fwDescriptionProperty] | highlight: $select.search"></div> <!--fwDescriptionProperty , descriptionProp(item)-->
</ui-select-choices>
</ui-select>
</div>
我想我在某個地方輸入錯了。 現在它可以正常工作了:
<ui-select-choices repeat="code[fwValueProperty] as code in fwCodes | propsFilter: { '{{fwDescriptionProperty}}': $select.search} track by $index"
refresh-delay="0">
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.