I'm building a hybrid app with Phonegap, but I don't want to use Ratchet, is there any alternative to Ratchet's push.js?
I want the user to move between pages without page refresh.
I'm building a hybrid app with Phonegap, but I don't want to use Ratchet, is there any alternative to Ratchet's push.js?
I want the user to move between pages without page refresh.
Copyright © 2021 Jogjafile Inc.
One option is to find a functional router (Backbone's for example), pull out the content loading/transition code from push.js, and write some custom code to package and inject your UI into the DOM.
push.js has code to manage the browser history cache and to make the ajax requests to support its content requests. If you are using some MV* like Backbone (as I am) you can package and feed your views into a modified version of the push.js
success
XHR handler. Besides that, theswapContent
method,bars
&transitionMap
associative arrays are all that you need to attach your content to the DOM and transition to a new page.I like the question you asked because it isn't clear how to fill the gap between minimalist UI frameworks that don't go far beyond prototyping like ratchet and ChocolateChipUI and full angular frameworks Ionic or OnsenUI.
Here are the code elements you need borrowed from push.js
And you can transition to new content