NgbModal对话框仅部分可见

时间:2019-07-19 05:28:40

标签: angular modal-dialog ng-bootstrap

我试图通过在角度5中使用NgbModal来获得模态对话框。它确实起作用,但是对话框的一部分超出了屏幕截图中所示的可见区域。

我有两个组件,一个是容器,另一个是模式对话框。 RegistrationComponent是容器类,RegistrationFormComponent是模式类。这些课程的片段如下。当我评论淡入淡出类时,对话框将出现在可见区域内。我尝试覆盖淡入淡出类,但仍然无法正常工作。

我正在遵循此处提到的确切步骤:https://medium.com/@izzatnadiri/how-to-pass-data-to-and-receive-from-ng-bootstrap-modals-916f2ad5d66e

环境:Angular 5.2.5,NgBootstrap 1.0.0

注册表格组件html:

<div class="modal-header">
    <h4 class="modal-title" id="modal-basic-title">Simple modal</h4>
    <button type="button" class="close" aria-label="Close" (click)="closeModal()">
        <span aria-hidden="true">&times;</span>
    </button>
</div>

<div class="modal-body">
    Body
</div>

<div class="modal-footer">
    Footer
</div>

注册组件html:

<div id="regId">
  <button class="btn btn-success" (click)="openModal()">open modal</button>
</div>

Part of the modal dialog goes above and only the lower half is visible as shown in this link.

0 个答案:

没有答案
相关问题