Angular UI Bootstrap Dialog Width

后端 未结 4 1950
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-07 03:36

The Angular UI Bootstrap Dialog is easy to implement, but difficult to customise.

How on earth do you change the width? Or even max-width?

http://angular-ui.gith

4条回答
  •  南方客
    南方客 (楼主)
    2021-02-07 04:20

    For version 0.8/0.9 the layout has changed so you do not specify the modal class, I fiddled a little around with it and found that I you can use a nested CCS definition like this:

    .xx-dialog .modal-dialog {
        width :90%;
        min-width: 800px;
    }
    

    And the when you launch the modal dialog specify the windowsStyle like this:

    modalInstance = $modal.open({
            templateUrl: 'templates/editxxx.html',
            controller: EditXXCtrl,
            windowClass: 'xx-dialog',
            resolve: {
                xx_uuid: function () {
                    return xx_guid;
                }
            }
        });
    

    But be aware that the windowsstyle is for the WHOLE window including the backdrop . Hope it helps

提交回复
热议问题