我正在使用this.myModal1.show()
&this.myModal2.show()
打开模式。但它总是触发myModal1
我的组件.ts
@ViewChild(ModalDirective) myModal1: ModalDirective;
@ViewChild(ModalDirective) myModal2: ModalDirective;
我的组件.html
<div class="modal fade" bsModal #myModal1="bs-modal"
tabindex="-1" role="dialog" aria-labelledby="dialog-events-name">
<div class="modal-dialog otp-modal">
<div class="modal-content">
...
</div>
</div>
</div>
<div class="modal fade" bsModal #myModal2="bs-modal"
tabindex="-1" role="dialog" aria-labelledby="dialog-events-name">
<div class="modal-dialog otp-modal">
<div class="modal-content">
...
</div>
</div>
</div>