NG-BOOTSTRAP 5:打开模态窗口时如何淡化父窗口(背景)?

时间:2019-08-26 15:42:17

标签: angular bootstrap-modal ng-bootstrap

我正在使用Angular Boostrap的Vanilla代码示例从以下位置启动模态窗口:https://ng-bootstrap.github.io/#/components/modal/examples

与NG-BOOTSTRAP中的示例不同,我的本地实现不会使父窗口(背景)变灰。.我可能需要做任何建议?

侧面说明: 包含Bootstrap.min.css v4.3.1

<ng-template #content let-modal>
            <div class="modal-header">
                <h4 class="modal-title" id="modal-basic-title">New Operator</h4>
                <button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Cross click')">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <app-eyp-operator [operator]="SelectedOperator"></app-eyp-operator>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-outline-dark" (click)="modal.close('Save click')">Save</button>
            </div>
</ng-template>








this.modalService.open(this.content, { size: 'xl', ariaLabelledBy: 'modal-basic-title', centered: true })

我希望父窗口变灰以帮助关注弹出的模态窗口,就像NG-BOOTSTRAP示例一样。

0 个答案:

没有答案