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

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -