1
我有一个foreach(超过FOOS)表,其中一个用户点击一个项目,这种方法被称为:复制可观察绑定到一个对话
AddFoo = function (addingItem) {
var addingItem = jQuery.extend(true, {}, existingObservableBoundToJqueryDialogue);
this.Foos.push(addingItem); //EditingItem is bound to the add dialogue, and I want a new observable with the same properties not bound to the dialogue
};
我有麻烦的是,如果我去和编辑这个可观察的(新的addItem)在表中,它改变了所有这些添加的项目(每个addingItem)
啊! – FutuToad 2013-03-07 15:43:42
是的,如果它是不可观察的,那么就没有双向绑定。顺便说一句,如果你有一个未编辑的模型(不绑定到输入字段),那么可以有非可观察的字段(它甚至可能快几毫秒;)) – 2013-03-07 15:44:18
再次感谢!在ASP.NET MVC btw脚本资源本地化的酷帖子! – FutuToad 2013-03-07 15:47:45