I need a drag and drop list with angular, but I need the $scope.list
change too because I must store the new order in my data base.
I found this answer and I used it to get this http://jsfiddle.net/aras7/9sueU/1/
var myapp = angular.module('myapp', ['ui']);
myapp.controller('controller', function ($scope) {
$scope.list = ["one", "two", "three", "four", "five", "six"];
});
angular.bootstrap(document, ['myapp']);
The problems is that when I try to change a element from top to down ONE possition is does NOT work.
For example take "one" and take it one position down to get "two,"one","three","four", ... second list should also change but it doesn't.
two
one
three
five
four
six
----------
one
two
three
five
four
six
both list should be equals.