Gathering detailed insights and metrics for ng-drag-drop-plus
Gathering detailed insights and metrics for ng-drag-drop-plus
Gathering detailed insights and metrics for ng-drag-drop-plus
Gathering detailed insights and metrics for ng-drag-drop-plus
npm install ng-drag-drop-plus
Typescript
Module System
Node Version
NPM Version
TypeScript (74.6%)
JavaScript (17.98%)
HTML (5.22%)
CSS (2.2%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Commits
29 Branches
1 Contributors
Updated on Jun 25, 2019
Latest Version
1.0.1
Package Id
ng-drag-drop-plus@1.0.1
Unpacked Size
80.35 kB
Size
15.57 kB
File Count
30
NPM Version
6.9.0
Node Version
12.4.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
2
Table of contents:
npm i ng-drag-drop-plus --save
Include the ng-calendar-plus module in your application at any place. The recommended way is to add forRoot initialization in the main app module.
import { NgDragDropPlusModule } from 'ng-drag-drop-plus';
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
NgDragDropPlusModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
import { Component } from '@angular/core';
import { NgDragDropPlusService } from 'ng-drag-drop-plus';
// import { NgDragDropPlusService } from 'projects/ng-drag-drop-plus/src/public-api';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'NgDragDropPlus';
Available = 'Available';
Selected = 'Selected';
courses = [
{
name: 'Angular'
},
{
name: 'Node js'
},
{
name: 'Sql Server'
},
{
name: 'Docker'
},
];
selectedCourses = [];
constructor(private ngDragDropPlusService: NgDragDropPlusService) {
this.ngDragDropPlusService.onDropSub.subscribe((event) => this.dropCourse(event));
}
dropCourse(event: DraggedEvent) {
const { data, source, destination } = event;
if (source === this.Available && destination === this.Selected) {
const index = this.courses.findIndex(c => c.name === data.name);
if (index !== -1) {
const course = this.courses.splice(index, 1);
this.selectedCourses.push(course[0]);
}
} else if (source === this.Selected && destination === this.Available) {
const index = this.selectedCourses.findIndex(c => c.name === data.name);
if (index !== -1) {
const course = this.selectedCourses.splice(index, 1);
this.courses.push(course[0]);
}
}
}
}
example use directives like below html
<div droppable [dragDestination]="Available" class="container">
<h2>Available Courses</h2>
<ul *ngFor="let course of courses">
<li draggable [dragData]="course" [dragSource]="Available" class="course-item">
{{course.name}}
</li>
</ul>
</div>
<div droppable [dragDestination]="Selected" class="container">
<h2>Dropped Courses</h2>
<ul *ngFor="let course of selectedCourses">
<li draggable [dragData]="course" [dragSource]="Selected" class="course-item">
{{course.name}}
</li>
</ul>
</div>
constructor(private ngDragDropPlusService: NgDragDropPlusService) {
this.ngDragDropPlusService.onDropSub.subscribe((event) => this.dropCourse(event));
}
Licensed under MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/5 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
143 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More