I'm using Framework7 and Phonegap for creating an app. I have page which loaded with JSON data from server and I need to hide preloader after whole page loaded with pictures and scripts. Data is loading with onPageBeforeInit
callback and I tried preloader.hide()
in onPageInit()
callback and also $$(document).on('pageAfterAnimation')
. I alos tried window.load
, binding and $$(document).('DOMContentLoaded')
but none of these working.
Which event will do this work? Thank you very much!
Hide Loader inside when the request is made and response comes back
For Framework 7 v3 it will be
// Showing loader
app.preloader.show("green");
app.request.post("url", {"data to send"}, function (data) {
//Here the response comes so hide loader
app.preloader.hide();
});
I am using this and working Fine for me