我正在使用Bootstrap 4创建一个angular 7应用程序。升级到Bootstrap 4后,模态窗口已停止工作。 有人可以告诉我问题是什么
我们一直在使用称为bs-modal的包装器,如下所示
<bs-modal #firmmodal [keyboard]="false" [backdrop]="'static'">
<bs-modal-header>
<h4 class="modal-title">Firm - {{ManagerStrategyDetails.FirmName}}
<div style="text-align: right"><button aria-label="Dismiss" class="close" style="margin-top: -20px" type="button" (click)="dismissFirmModal()">X</button></div>
</h4>
</bs-modal-header>
<bs-modal-body>
<mgr-firm></mgr-firm>
</bs-modal-body>
<bs-modal-footer [showDefaultButtons]="false"></bs-modal-footer>
</bs-modal>
<bs-modal #managermodal [keyboard]="false" [backdrop]="'static'">
<bs-modal-header>
<h4 class="modal-title">Manager - {{ManagerStrategyDetails.ManagerName}}
<div style="text-align: right"><button aria-label="Dismiss" class="close" style="margin-top: -20px" type="button" (click)="dismissManagerModal()">X</button></div>
</h4>
</bs-modal-header>
<bs-modal-body>
<mgr-manager [ManagerId] = 'ManagerId' ></mgr-manager>
</bs-modal-body>
<bs-modal-footer [showDefaultButtons]="false"></bs-modal-footer>
</bs-modal>
组件
import { BsModalComponent } from 'ng2-bs3-modal';
openFirmModal() {
this.firmmodal.open();
}
dismissFirmModal() {
this.firmmodal.dismiss();
}
openFundModal() {
this.fundmodal.open();
}
dismissFundModal() {
this.fundmodal.dismiss();
}
答案 0 :(得分:0)
在GitHub上有一个相关的封闭问题:https://github.com/dougludlow/ng2-bs3-modal/issues/193
总而言之,他们没有提到支持引导程序4的立即计划,但建议尝试使用ng2-bs4-modal。 https://github.com/maxfisher05/ng2-bs4-modal