简体   繁体   中英

angular js drop down value order change

I need to change drop down value order. this is my drop down

<select ng-model="reportSearch.charityId">
    <option value="">--- All Charity ---</option>
    <option  ng-repeat="item in charityList | orderBy:'+value'">
      {{item.value}}
    </option> 
</select>

this is the my demo. in my demo i need to 'Engagement1 Name' show as the 5th option in the drop down. how i change that order.

Demo

You can sort by the key .

<option  ng-repeat="item in charityList | orderBy:'+key'">{{item.value}}</option> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM