我在敲除“With”绑定时遇到问题。我可以绑定。我可以绑定嵌套对象没问题,但不能绑定嵌套模型。我做错了还是这超出了“with”绑定的范围。
var viewModel = function(){
var self = this;
self.anObject = {
test: ko.observable("I'm and object bound by WITH.")
}
var aFunction = function (){
var self = this;
self.test = ko.observable("I would like to be bound by WITH");
}
};
ko.applyBindings(new viewModel());
这是我的小提琴http://jsfiddle.net/t3T5N/1/