Salvo Rossitto
Salvo Rossitto

Reputation: 25

How to drag elements in Ionic 4/5

I would like to create draggable (free) buttons in Ionic. In ionic 3 I used a directive to do this (link https://www.joshmorony.com/building-an-absolute-drag-directive-in-ionic-2/) but this directive don't works in ionic 5 and it does not give any errors. What do you think is the best library (supported from some tutorial) for ionic 5 to do this? Thanks in advance.

Upvotes: 1

Views: 5964

Answers (1)

user796446
user796446

Reputation:

This does not have to be Ionic specific. If you are using angular you can just use an NPM component such as https://www.npmjs.com/package/angular-draggable-droppable

There is also support for this in Angular Material library

https://material.angular.io/cdk/drag-drop/overview

Upvotes: 3

Related Questions