Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.