
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
angular-draganddrop
Advanced tools
Drag and drop directives for Angular using native HTML5 API.
bower install angular-draganddrop
npm install angular-draganddrop
HTML :
<!-- Load files. -->
<script src="angular.js"></script>
<script src="angular-draganddrop.js"></script>
<div ng-controller="DragDropCtrl">
<!-- Draggable element. -->
<div draggable="true" effect-allowed="copy" draggable-type="custom-object" draggable-data="{foo: 'bar'}"></div>
<!-- Dropzone element. -->
<div drop="onDrop($data, $event)" drop-effect="copy" drop-accept="'json/custom-object'" drag-over="onDragOver($event)" drag-over-class="drag-over-accept"></div>
</div>
JavaScript :
angular.module('controllers.dragDrop', ['draganddrop'])
.controller('DragDropCtrl', function ($scope) {
// Drop handler.
$scope.onDrop = function (data, event) {
// Get custom object data.
var customObjectData = data['json/custom-object']; // {foo: 'bar'}
// Get other attached data.
var uriList = data['text/uri-list']; // http://mywebsite.com/..
// ...
};
// Drag over handler.
$scope.onDragOver = function (event) {
// ...
};
});
The draggable directive serializes data as JSON and prefix the specified type with "json/".
The drop directive automatically unserializes data with the "json" format, other data are not formatted.
All navigators that support the native HTML5 API should be supported.
Tested on Firefox 24+, Chrome 31+.
MIT
FAQs
Drag and drop directives for Angular using native HTML5 API.
The npm package angular-draganddrop receives a total of 3 weekly downloads. As such, angular-draganddrop popularity was classified as not popular.
We found that angular-draganddrop demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.