Essentially, I would like users to be able to drag and drop an item or click up/down arrows to move an item in the list.
Is there a good way to update the items' indexes that plays nice with ui-sortable/angular-ui?
Thanks.
update
we were able to solve this by adding a function in our controller that would remove the item from the array and add it back in one index greater or lesser than its original position. Here is a sloppy example:
$scope.upDown = function(oldIndex, newIndex) {
var item = $scope.list[oldIndex];
$scope.list.splice(oldIndex,1);
$scope.list.splice(newIndex,0,item);
};
you would need to add a check if it was the first or last elem in the array to disable up or down accordingly.