I'm having some troubles trying to reach a solution for this problem:
I have an ng-repeat of items, and those items need to be sorted by a dropdown of numbers (I don't need this to be done dinamically, I just need to assign a values to each item). First of all, I need to display a dropdown with values from 1 to items.length;
<div ng-repeat="item in items">
<span>{{item.name}}</span>
<span></span> <!-- Here I should display a dropdown with values from 1 to items.length -->
</div>
Besides that, it'd be great if I can make the dropdown values mutually exclusive between them. For example, if I choose "1" value for the dropdown in first item, "1" should not be an option in the all other dropdowns.
Here there is a fiddle.
Any help?
Thanks!