0
在我的視圖模型中,我有一個網格,如果用戶單擊該行上的編輯按鈕,它將彈出一個帶有行值的對話框,如果用戶單擊編輯按鈕將關閉對話框,然後我需要重新加載網格。我的模型看起來像下面,我的情況 我不能呼叫加載函數對話框回調後(**越過錯誤 - 自我未定義**)。有可能通過這個對話?Durandal dialog回電函數
var ctor = function() {
var self = this;
self.load = function() {
Load grid Functions
}
self.editRow = function (row) {
dialog.show(new editWindow(), row).then(function (response) {
if (response == null) {
return;
}
self.load();
});
}
Return ctor;