How to pass a parameter to pathFor in Handlebars for Iron-Router with Meteorite?
问题 I have a simple route with a parameter: this.route('article', { path: '/article/:_id', data: function() { return Articles.findOne(this.params._id); } }); I would like to have use the pathFor handlebars helper here with the _id: {{#each articles}} <li><a href="{{pathFor 'article' _id}}">{{title}}</a></li> {{/each}} This doesnt work for passing the _id tag into the url though... 回答1: <li><a href="{{pathFor 'article' _id=this._id }}">{{title}}</a></li> Thats how you pass a parameter 回答2: In your