Accessing viewModel functions by prototype
问题 I am attempting to create a generic Container for my viewModels so common methods can be applied a variety of objects without specific knowledge ot the viewModel. The container and contained object would look like this: var containedViewModel = function() { var self = this; self.id = ko.observable(); ... self.doSomething = function() { alert('here'); }; } var ContainerModel = function(cRoot, cModel, cName) { var self = this; self.rootModel = cRoot; // Root view model self.viewName = cName; //