我有两个连接在一起的计算 observables。我遇到的问题似乎与我的 observable 没有以正确的顺序更新(碰巧先完成计算然后检查)这一事实有关,这可能会破坏我的应用程序。
vm = function() {
var self = this;
this.check = ko.computed(function() {
// does some checking return true if no problem false otherwise
};
this.compute = ko.computed(function() {
if (self.check())
// does computation
}
};
有没有办法强制评估顺序?