I am following the common requieVM pattern and am having an issue accessing the property set.
<div class="viewServer" data-bind="page:{id:'viewServer'}" >
<div data-bind="page:{id:'?', nameParam:'Address', sourceOnShow:'/views/servers/viewServer.html', withOnShow:requireVM('/viewmodels/servers/viewServerViewModel.js')}">
</div>
</div><!--END PAGE-->
This hit's twice in pagerjs:
if (this.ctx[nameParam]) { // set observable ...
this.ctx[nameParam](this.currentId);
} else { // ... or create observable
this.ctx[nameParam] = ko.observable(this.currentId);
}
First it creates a new observable because context is not set.
Then it sets the observable.
In the VM doing:
self.Address.subscribe(function(newval){
alert(self.Address());
});
Does nothing, as the self.Address gets overwritten.
When trying to get to #/viewserver/ipaddress
I am following the common requieVM pattern and am having an issue accessing the property set.
This hit's twice in pagerjs:
First it creates a new observable because context is not set.
Then it sets the observable.
In the VM doing:
Does nothing, as the self.Address gets overwritten.
When trying to get to #/viewserver/ipaddress