I use this solution http://meteorpad.com/pad/5kii9SRbbnjiTHeQe
MeteorPad does not allow the use of IronRouter, so my example does not use it. In IronRouter, you can use the action () method to set the sessionPage variable and always display the adapter pattern. Something like that:
Router.map(function() { this.route('home', { path: '/', action: function() { Session.set('currentPage', 'home'); this.render('transitioner'); } }); this.route('about', { action: function() { Session.set('currentPage', 'about'); this.render('transitioner'); } }); });
I use a shell for this. It also helps me identify transition styles and directions.
And be careful with subscribing / unsubscribing, because the previous page will respond to subscription changes before the transition is complelete!
Martin branch
source share