Dragula Drag only wanted elements

Here is my component.html

<div class="row" [dragula]='"photos-bag"' [dragulaModel]='photos'>
    <div *ngFor="let photo of photos" [class.sortable]="photo.sortable">
        <a href="" class="thumbnail" > 
            <img src="" > 
        </a>
        {{ photo.name }}
    </div>                                                                                                                                                                                                      
</div>

and here is the part in my component.ts which set the element to be draggable if it contains a sortable class

dragulaService.setOptions('photos-bag', {
    moves: function(el, source, handle, sibling) {
            return el.classList.contains('sortable');
        },
});

Now here is the problem.. is there an option to only switch elements that has the sortable class?.. So far I thought accepts/invalid option will do the trick but it seems not.


ANSWERS:


Insted using [class.sortable]="photo.sortable" use [className]="cssClass(photo)"

.html

<div class="row" [dragula]='"photos-bag"' [dragulaModel]='photos'>
    <div *ngFor="let photo of photos" [className]="cssClass(photo)>
        <a href="" class="thumbnail" > 
            <img src="" > 
        </a>
        {{ photo.name }}
    </div>                                                                                                                                                                                                      
</div>

.ts file

cssClass(photo){
   // based on condition return "draggable CSS" or **Non draggable CSS** 
}

DragulaService

dragulaService.setOptions('photos-bag', {
    moves: function(el, source, handle, sibling) {
           return el.className === "draggableCSS"?true:false
        },
});

if still not working create plunker.



 MORE:


 ? angular2 Dragula css cursor grab/grabbing not working
 ? ng2-dragula group items in div
 ? Adding Dragular to Angular2 Application: document is not defined
 ? AOT error: require is not defined (caused by ng2-dragula library)
 ? Using ng2-dragula to drag and swap grid lists
 ? How to make it work: Dragula drag-and-drop on Meteor
 ? angular-dragular issue with dragular-model
 ? Multiple containers with Dragula, but restrict items to only their container
 ? ng2-dragula style original element when copying
 ? swipe in uitableveiw ,Delete button does not appear. Also when I swipe it very fast, delete button appears