Angular5 Sweetalert2套接字连接绑定问题

时间:2018-09-22 14:39:26

标签: angular angular5 sweetalert2

好吧,我有一个Angular项目,当任何数据传入套接字时,Angular5都有套接字连接,我正在调用async方法和绑定模型。当前时间指的是按钮文本,但是当用户单击按钮SweetAlert模态打开但当前时间未更新时,它仍然是最后一次单击的值,但是在主页currentime上仍在计算这里的问题?

async OnDataReceived(messageFromHub) {

    this.currentTime = messageFromHub.TimeStamp;

}

     <button class="btn" [swal] ="timemodal" >{{ currentTime  }}</button>


     <swal #timemodal width="576px">
         <div class="exchange-modal">
        <div class="header-title">{{  currentTime}}/</div>
     </div>
    </swal>

0 个答案:

没有答案