This directive allows you to sort an array with drag & drop.
All the jQueryUI Sortable options can be defined in your controller.
plugin.controller('MyController', function($scope) {
$scope.items = ["One", "Two", "Three"];
$scope.sortableOptions = {
update: function(e, ui) { ... },
axis: 'x'
};
});
Apply the directive to your form elements:
<ul ui-sortable="sortableOptions" ng-model="items">
<li ng-repeat="item in items"></li>
</ul>