好吧,我有一个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>