-1
我想过滤一个数组的ng选项。举例:按数组筛选Angular JS ng选项
<select
ng-model="currentItem.Community.white_label_id"
ng-options="whitelabel.WhiteLabel.id as whitelabel.WhiteLabel.name for whitelabel in whitelabels | filter:whitelabel.WhiteLabel.id in currentWhiteLabel.affiliatedids"
>
currentWhiteLabel.affiliatedids看起来像[73,71]
我怎样才能做到这一点?
你能够分享一些示例数据吗? – Ankh
whitelabels是一个数组,例如{“WhiteLabel”:{“id”:28,“name”:“abd”,“code”:“abc”,“type”:“collectivity”,“active”:true,嵌入 “:假的,” 子域 “:””, “网站”: “http://dqsfsdf.com”, “help_website”:空, “email_auto”: “[email protected]”}}。 Ng选项很好,但是我不能用数组来过滤它们 – Cby