I am working on drag n drop functionality using angular-ui-sortable. I am using connected list example provided here in GitHub repo.
In list#1 I have list of HTML controls and list#2 is empty. By default when I drag any item from list#1 it will remove from list#1 and add in list#2. I do not want to remove it from the list instead a copy of it adds in list#2. And list#2 items cannot be dragged back on list#1.
Here is my code
<div class="floatleft">
<div ui-sortable="sortableOptions" class="apps-container screen floatleft" ng-model="list1">
<div class="app" ng-repeat="app in list1">{{$index}} {{app.title}}</div>
</div>
<div ui-sortable="sortableOptions" class="apps-container screen floatleft" ng-model="list2">
<div class="app" ng-repeat="app in list2">{{$index}} {{app.title}}</div>
</div>
<div style="clear: both;"></div>
</div>
$scope.list1 = [{
name: 'Checkbox'
}, {
name: 'text'
}, {
name: 'email'
}, ]
$scope.list2 = [];
$scope.sortableOptions = {
placeholder: "app",
connectWith: ".apps-container"
};
Need help how do I achieve that.