Angular 2 - Open/Close default bootstrap modal

前端 未结 5 1784
悲哀的现实
悲哀的现实 2020-12-30 02:15

I do not want to use angular2-bootstrap or ng2-bs3-modal as suggested in the questions/answers Angular 2 Bootstrap Modal and Angular 2.0 and Modal Dialog

Now. I kno

5条回答
  •  囚心锁ツ
    2020-12-30 03:03

    I have done like this and it works for me perfectly.

    var element = document.getElementById("CloseButton") as any;

    element.click(); Where my CloseButton is bootstrap close button

提交回复
热议问题