How to use code to open a modal in Angular 2?

前端 未结 14 3016
天涯浪人
天涯浪人 2020-12-05 04:34

Usually we use data-target=\"#myModal\" in the

14条回答
  •  再見小時候
    2020-12-05 04:57

    For me I had to settimeout in addition to @arjun-sk solution's (link), as I was getting the error

    setTimeout(() => {
          this.modalService.open(this.loginModal, { centered: true })
        }, 100); 
    

提交回复
热议问题