Open squarfed opened 7 years ago
How should one use fast render when the route has parameters? I have this code in the lib folder:
lib
FlowRouter.route('/articles/:articleId', { action: function() { // The template 'article' runs the following subscription: // this.subscribe('singleArticle',articleId) BlazeLayout.render('website', {content: 'article'}); } }); if (Meteor.isServer) { FastRender.route('/articles/:articleId', function(params) { console.log('params: ',params) this.subscribe('singleArticle', params.articleId) }) }
However the FastRender.route code does not run again when you go to a route with a different article_id. I tried using:
FastRender.route
Tracker.autorun( () => { FlowRouter.watchPathChange() console.log('params: ',params) this.subscribe('singleArticle', params.articleId) })
But watchPathChange is not defined on the server...
watchPathChange
How should one use fast render when the route has parameters? I have this code in the
lib
folder:However the
FastRender.route
code does not run again when you go to a route with a different article_id. I tried using:But
watchPathChange
is not defined on the server...