Reputation: 8961
I have the following route:
FlowRouter.route('/users/:_id/edit', {
name: 'Users.edit',
action() {
BlazeLayout.render('App_body', { main: 'Users_edit_page' });
},
});
And I can access the appropriate page with the following code:
var userId = Meteor.userId();
FlowRouter.go('/users/' + userId + '/edit');
How do you pass the userId through to Users.edit
name, instead of using the URI path.
Incidentally, I read somewhere that FlowRouter doesn't have named routes - is this not a named route?
Upvotes: 1
Views: 1080
Reputation: 6584
FlowRouter.go('Users.edit', {id: 1});
See here: https://github.com/kadirahq/flow-router#api
Upvotes: 4