I have two view models in Knockout.js and I am aware that i can bind them separately, however is it possible for me to add them both in a Master View Model and bind it once. Something like ko.applyBindingings(MasterViewModel); Any help or advice is much appreaciated. Thanks a ton.
var ViewModel1 = {
id: ko.observable(""),
name: ko.observable("")}
var ViewModel2 = {
id: ko.observable(""),
name: ko.observable("")}
Right now I bind it as folllows: ko.applyBindings(ViewModel1 , document.getElementById('div1')); ko.applyBindings(ViewModel2 , document.getElementById('div2'));