ngx-modialog icon indicating copy to clipboard operation
ngx-modialog copied to clipboard

Custom Modal Size

Open zerox12311 opened this issue 8 years ago • 2 comments

[ ] bug report [ ] feature request [*] question about the decisions made in the repository

Excuse me , how can i use Components as content in this library I had tried the Custom Modal example , but I can't change the Modal size

I want to use this like ng-bootstrap modal but i don't how to do....

Please help me....thanks

zerox12311 avatar Mar 28 '17 06:03 zerox12311

just add modal-sm (small) or custom class to dialog element classes using property this.context.dialogClass eg:

constructor(public dialog: DialogRef<CustomModalContext>) {
    this.context = dialog.context;
    this.context.dialogClass = 'modal-dialog modal-sm';
}

lpikora avatar Apr 04 '17 10:04 lpikora

for me, the above solution didn't work. Since it prevented rendering the modal. So instead of adding class to context's dialogClass, I modified the template like this

<div class="modal show" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
            </div>
            <div class="modal-body">
            </div>
            <div class="modal-footer">
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>

puneethrai avatar May 30 '18 04:05 puneethrai