Popin 在 IE11 中没有关闭

Popin not getting closed in IE11

你好,我在我的 angular 6 中使用 ngbootstrap 模态 window,我的 html 中有以下代码来关闭 popin。

 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
        <span (click)="closePopin()">×</span></button>
    </div>

这是 .ts 文件中的代码。

import {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';

 constructor(public activeModal: NgbActiveModal) {}
 closePopin() {
       this.activeModal.close();     
   }

但是这在 IE11 上不起作用,当我们点击 popin X 按钮时没有任何反应,n

如果将 (click)="closePopin()span 元素移动到父 button 元素,它将在 IE11 中工作:

<button type="button" class="close" data-dismiss="modal" aria-label="Close" (click)="closePopin()">
    <span>×</span>
</button>

请参阅 this StackBlitz 进行演示