-1
考慮下面的代碼:淘汰賽推遲評估
self.IsVisible = ko.computed({
read: function() {
//some logic goes here
}
return true;
},
deferEvaluation: true
}, this);
我的問題是,儘管被設置爲true deferEvaluation選項,在達到ISVISIBLE的代碼時,我第一次創建我的視圖模型。我希望只有在IsVisible綁定實際完成某處時才能訪問此代碼....
我在做什麼錯了?
您如何知道讀取函數正在執行?你有警告嗎? – 2013-03-20 08:58:25
chrome中的斷點:) – Sam 2013-03-20 09:22:57