[SOLVED] Infinite scroll preloader


#1

Hello Vladimir, I created an infinite scroll and wanted to know how to hide the preload gif when for example I have only 1 item in the list, it appears just below the first item, but I did not understand how to make it disappear, I first load the routes, then load other items within the template.
I already tried this
$$ (’. Infinite-scroll-preloader’).remove();
but it did not work too, I do not understand how to do it.
The example I’m using is yours here.
Tnx for help


Perguntas sobre Framework7 em Português BR
[ SOLVED ] Passing parameter from list view for router
#2

This is correct

If it doesn’t work, then you call it in wrong place/time. Provide full page code example


#3

Here is the complete code, where you start the query in routes and the template where you load the rest
I check if the size is smaller than 20, and I try to hide

Link pastebin


#4

You should do such logic in your component file divida_notificar.html , when you do it in async route callback, the page doesn’t exist yet.

Also add the following to component data object:

showPreloaderOnLoad: this.$route.context.documento.length >= 20

And in your page html template just wrap preloaded with

{{#if showPreloaderOnLoad}}

#5

It worked, I had not noticed that it did not yet exist because of async.

Another thing is how do I view the javascript debug that is on line 128 of the pastebin, when I put a console.log, I can not see anywhere, or can not even see?
Thanks for the help at the moment, sorry for the English and I’m still new with fw2, I saw some things of the “vue” style, but I only gave a read over it, still, so a lot of things are still obscure for me.