Socket
Socket
Sign inDemoInstall

ng-drag-drop-list

Package Overview
Dependencies
5
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ng-drag-drop-list

Drag and drop list for angular


Version published
Weekly downloads
149
increased by75.29%
Maintainers
1
Install size
186 kB
Created
Weekly downloads
 

Readme

Source

NPM

Build Status

Demo

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

InputTypeDefault
dragDropListArray-
triggerHTMLElementnativeElement
durationnumber300
OutputEmit
dragDropListChangeArray

Keywords

FAQs

Last updated on 02 Apr 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc