I have a page with a knockout model, inside the knockout model there are such submodules:
function firstSubViewModel(listData) {
var self = this;
self.myAttribute = ko.observable();
function that sets stuff()
return self;
}
var MyViewModel = function () {
var self = this;
self.foo= new firstSubViewModel(params);
self.bar= new secondSubViewModel(otherparams);
}
vm = new MyViewModel();
ko.applyBindings(vm);
It's just psuedocode, actually there are a bunch of submodels, each of which has a bunch of its own attributes and other called functions. First I would like to hide this page, and then when all the data from all the submodules is presented, I will show the main page. So far I have tried setting:
<div id = "main" style = "display: none" data-bind = "visible: true"></div>
, , . - , , , , , myAttribute , , . .
<div id = "main" style = "display: none" data-bind = "visible: vm.foo.myAttribute"></div>
, , , ,
<div data-bind = "visible:vm.foo.myAttribute && vm.bar.myAttribute && vm.bar.otherAttribute && etc.."></div>
, ?