O'Reilly logo
  • Todd Schavey thinks this is interesting:



Cover of Getting Started with Knockout.js for .NET Developers


This is not working for some reason. The browser console reports: 07:59:42.155 TypeError: self.children.push is not a function1 PersonalPage.html. The ViewModel does have a children variable that is set to ko.observable(person.children). The page loads just fine..but only when I hit the Add button does this get reported. When I change it to this it works: self.addChild = function(){ if(self.addChildEnabled){ innerArray = self.children(); innerArray.push(self.newChild()); self.children.valueHasMutated(); self.newChild(""); } }