LoadingTemplates vs "Waiting" in current route


#1

Instead of displaying a “Loading Template” until subscriptions are ready, is it possible to stay on current route until the next route’s subscriptions are all ready?

I’d like to “dim” the current page route until the next route is ready then go to that route and display the next route’s content immediately.


#2

Make the loading template a full screen overlay with an alpha transparency sufficient for the amount of “dimness” you want. Check the sacha:spin package: he uses a spinner overlay, but the principle is the same.


#3

Just tried your method… It made sense but it didn’t work because by the time you go to a new route and start displaying the “loading” template, the previous template is completely gone.

Does anyone have any other methods?


#4

I did not try it yet, but take a look at Fast Render package https://meteorhacks.com/introducing-fast-render.html

Maybe it fits with what you are looking for.

Marc


#5

Ugh, that’s not the problem.

The iron-router’s “loadingTemplate” option is ran at the beginning of the route, not at the end.

This means when I change the route, previous route is all gone before the “loadingTemplate” is rendered from the next route. Which means even if I display a overlayed DOM element, it will be on top of a empty blank body until subscriptions are ready.


#6

Have you tried ccorcos:transitioner? It’s tightly integrated with iron router and has a fade transition between routes, which may be ok for your requirements.

There’s also a demo to play with.


#7

This looks awesome. Thank you, I’m going to give it a shot.