How to use placeholder feature in ng-sortable?

412 Views Asked by At

any example of how to use this feature ?

A customized placeholder can be provided by specifying the placeholder option provided to the as-sortable item. placeholder can be both a template string or a function returning a template string. ng-sortable , I have tried to put a template but its not appearing on the placeholder, I want the place holder to be a copy of the dragged item with low opacity.

Thanks,

1

There are 1 best solutions below

1
On

I used this configuration for the "as-sortable" property

$scope.dragDropMetricsOpts = { orderChanged: function( event ){}, containment: "#board", clone: true, allowDuplicates: false, placeholder: function( event ){ return "<div style="background: red;"></div>"; } };