خرید بک لینک

Vote count: 0

I am using angular-dragdrop. What I need is to insert the dragged item in the correct place in the list I am dragging over. When the drop happens I get:

 $scope.onDrop = function ($event, $data, array) {
        // $data is the object being dropped.   
        array.push({
            id: $data.id,
            text: $data.text
        });
    };

and as you can see I am just adding to the end of the array. If I had an index, then I can insert it where it was dropped.

Is this possible with the component?

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 15 خرداد 1395 ساعت: 4:35

صفحه بندی