angular.modeul('app').directive('droppable', function () {
return {
scope: {
item: '=droppable',
callback: '&onDrop'
},
link: function (scope, el, attr) {
el.on('drop', function (){
scope.$apply(function () {
scope.callback(scope.item);
})
});
}
}
});