[英]aurelia view-model properties inside a promise “then” function
我正在嘗試將我的視圖模型屬性和綁定訪問到promise的“ then”函數中,如下所示:
let that = this;
this.getDate().then(data => {
that.binding.style.backgroundColor = "white";
console.log(that.property);
});
事情是“這個”是不確定的,所以我應該怎么得到那些?
當我應該嘗試讀取的變量是_this5時,我的錯誤是試圖在調試器中讀取“ this”,該變量是由babel transpiller為ES5創建的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.