You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(this.ctx[nameParam]){// set observable ...this.ctx[nameParam](this.currentId);}else{// ... or create observablethis.ctx[nameParam]=ko.observable(this.currentId);}
First it creates a new observable because context is not set.
Then it sets the observable.
I have limited time to check for the solution at the moment. I guess pagerjs need to defer the creation/binding of currentId until the view model is loaded or maybe merge the created observables with the lazy-loaded view-model somehow.
A workaround until I've fixed this might be to use bind (undocumented feature at the moment) that can be used like
where the pager.Page-object will be bound to the observable myPage. From there you should be able to fetch the currentId (you can use getCurrentId which is an observable to the current ID).
Another tip is to use navigationFailed (http://pagerjs.com/demo/#!/navigation/failed_navigation) to create child-pages on-demand instead of using id: '?'. There are some trade-offs between the different solutions (using navigationFailed makes it possible to animate between page transitions - on the downside new dom-elements are created and the code is at the moment a bit more verbose).
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
The text was updated successfully, but these errors were encountered: