3.0.0 • Published 5 years ago
ng-drag-drop-list v3.0.0
ng-drag-drop-list
Ng Drag Drop List is an Angular library for drag and drop elements on list.
Installation
Install with npm
npm install ng-drag-drop-list
Install with yarn
yarn add ng-drag-drop-list
Usage
Add DragDropListModule
to your list of module imports:
import { DragDropListModule } from 'ng-drag-drop-list';
@NgModule({
imports: [
...
DragDropListModule
],
...
})
export class AppModule { }
Create a list in your component (of colors for example)
import { Component } from '@angular/core';
@Component({
...
})
export class AppComponent {
colors = ['blue', 'red', 'greenyellow', 'purple', 'grey'];
}
Use dragDropList
directive on the drag elements (TWO-WAY binding):
<div *ngFor="let color of colors"
[(dragDropList)]="colors">
{{color}}
</div>
For specific dragging trigger:
<div *ngFor="let color of colors"
[(dragDropList)]="colors"
[trigger]="trigger">
<button #trigger> TRIGER </button>
{{color}}
</div>
Api
Input | Type | Default |
---|---|---|
dragDropList | Array | - |
trigger | HTMLElement | nativeElement |
duration | number | 300 |
Output | Emit |
---|---|
dragDropListChange | Array |
3.0.0
5 years ago
2.0.5
6 years ago
2.0.4
6 years ago
2.0.3
6 years ago
2.0.0
6 years ago
0.0.1
6 years ago
1.0.18
6 years ago
1.0.17
6 years ago
1.0.16
6 years ago
1.0.15
6 years ago
1.0.14
6 years ago
1.0.13
6 years ago
1.0.12
6 years ago
1.0.11
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.7
6 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago