I made a directive in angular js restricted it to act as a class and this directive makes my element drag-able.
On mousehover i want to do addClass and add this directive which is supposedly a class, but this doesnt give the desired result, am i missing something? below is what I am doing
module.directive('myDraggable', function ($document) {
var directiveObject= {
restrict:'AC',
//logic of dragging
}
return directiveObject;
});
i try to do
element.addClass('myDraggable'); // but this fails! pls help