AngularUI modal to be draggable and resizable

前端 未结 6 506
逝去的感伤
逝去的感伤 2021-02-04 02:19

I have an angularUi modal window wrapped in a directive:

html:



  
    

        
6条回答
  •  孤街浪徒
    2021-02-04 03:09

    an Angular UI modal with a draggable title bar

    NOTE: have to load both jQuery and jQuery UI before AngularJS scripts.

    angular.module('xxApp')
        .directive('uibModalWindow', function () {
            return {
                restrict: 'EA',
                link: function (scope, element) {
                    $('.modal-content').draggable({handle: ".modal-header"});
                }
            }
        });
    

提交回复
热议问题