I am wanting to make ngDialog draggable, using jQueryUI, or just Angular (preferred).
Here is an example of the modal becoming draggable using jQueryUI: JSFiddle (Modal)
$(".modal").draggable({
handle: ".modal-header"
});
I tried to replicate it with ngDialog, but was not able to do so.. JSFiddle (ngDialog)
$(".ngdialog ").draggable({
handle: ".ngdialog-content"
});
// $(".ngdialog ").draggable();
Here is demo of a div being draggable using a directive: JSFiddle (Directive), taken from this SO Question.
app.directive('dragMe', function() {
return {
restrict: 'A',
link: function(scope, elem, attr, ctrl) {
elem.draggable();
}
};
});
put inside controller initialization: