How can I assign values to $scope.dragged
and $scope.dropped
in a JavaScript function?
function drag(e){
e.dataTransfer.setData("text/html", e.target.id);
console.log(e.target.id);
$scope.dragged = e.target.className;
}
function drop(e){
e.preventDefault();
$('#relationmodal').modal('show');
e.target.className = "AAA";
var droppedon = e.target.className;
console.log(droppedon);
$scope.dropped = e.target.className;
}