Move me, but you can only drop me in one of these containers.
If you try to drop me somewhere other than these containers, I'll just come back.
Item 3.
Item 6.
You can drop me in the left container, otherwise I'll stay here.
Item 4.
Item 5.
// JS
controller('Directive', ['$scope', 'dragularService', function TodoCtrl($scope) {
$scope.dragularOptions = {
classes: {
mirror: 'custom-green-mirror'
},
nameSpace: 'common' // just connecting left and right container
};
}])
<!-- HTML -->
<div class='wrapper' ng-controller="Directive">
<div class='containerVertical' dragular="dragularOptions">
<div>Move me, but you can only drop me in one of these containers.</div>
<div>If you try to drop me somewhere other than these containers, I'll just come back.</div>
<div>Item 3.</div>
<div>Item 6.</div>
</div>
<div class='containerVertical' dragular='{"classes":{"mirror":"custom-green-mirror"},"nameSpace":"same"}'>
<div>You can drop me in the left container, otherwise I'll stay here.</div>
<div>Item 4.</div>
<div>Item 5.</div>
</div>
</div>