javascript - Meteor Router.go not passing params -
snippet of code client-side:
template.projecteditbutton.events({ "click .edit": function() { router.go('projectform', {prjid: this._id}); } });
at point, this._id correct. in router file:
router.route('/projects/form', { name: 'projectform', data: function() { return projects.findone(this.params.prjid); } });
this.params empty. missing?
you need add parameter route definition in order mapping work:
router.route('/projects/form/:prjid', { name: 'projectform', data: function() { return projects.findone(this.params.prjid); } });
Comments
Post a Comment