[英]Angularjs ui-select Dynamic object mapping inside repeat
my ui-select directive code is below just working fine. 我的ui-select指令代码在下面正常工作。 Inside repeat , i need to set propert of CODE object (which is ID) to dynamic like code[fwValueProperty] . 在重复中,我需要将CODE对象(即ID)的属性设置为动态代码[fwValueProperty] 。 As far as i know , it is not ng-repeat so i cannot use it as code[fwValueProperty]. 据我所知,这不是ng-repeat,所以我不能将其用作代码[fwValueProperty]。 How can i achieve this? 我怎样才能做到这一点?
<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>
I think i did mistyped somewhere. 我想我在某个地方输入错了。 Now it works as it should be: 现在它可以正常工作了:
<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.