
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
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.
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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.