我的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">