How to Use ngDraggable in AngularJS?

ngDraggable is drag and drop module for AngularJS, provided support for touch devices.

 

Usage

Referenced scripts in head tag.

In dependencies of application use ngDraggable

Add directive attributes ng-drag ng-drag-data ng-drag-success ng-center-anchor to your HTML:

Now add Drop area:

Then create a controller:

Below is an example using Jquery UI:

Reference

https://github.com/fatlinesofcode/ngDraggable

 

Close