Hi
My app changes pages by setting a localStorage variable as a key then calling Appery.navigateTo(). The Pageshow event calls a service with the key and the page is populated. This is how one of your earlier basic tutorials worked.
When I have to call the same page with different data, I still set the localStorage variable as a key, but use Appery(pagename).trigger("pageshow") to refresh the content.
This works very well, but 'back' behavior is a problem - only transitions between page types is captured. The setting and reading of localStorage, not surprisingly, seems to be invisible.
I could build my own back/forward navigation, but I'd prefer to make the standard back button work properly, and I'd like some guidance as to the best approach:
One approach would be to pass a query string to the new page, rather than a localStorage variable, so all urls are different. This, I hope, would force each change into history.
(I'm not using a multi-page template)
Question: Can I pass a query string with Appery.navigateTo() ?
Question: Could this work with .trigger("pageshow")?
Another approach could be to alter $.mobile.urlHistory, and change the current url to one with a query string.
Question: is it possible to change the current entry in this manner?
The other alternative is to maintain my own history array - to build back/forward handling in the app itself, but I'd prefer to make the built-in functions work.
I'm sorry for the long question, but I would imaging Appery folk will have come across this issue before (although i can't see anything relevant in the forum).
Thanks for your help
John
PS - Love the new syntax checker ![]()