Passing Meteor's Iron Router Parameters to Template Callback
javascript, meteor, node.js
Solution
Have you tried Router.current().params?
Problem
How do you pass the Iron Router parameters to a `Template.myTemplate.rendered` callback? The following route and callback function gives `undefined` for both `console.log`. URL ``` http://localhost:3000/story/1234 ``` Router.js ``` Router.map( function() { this.route('story', { path: '/story/:_id', template: 'story' }) }) ``` story.js ``` Template.story.rendered = function () { console.log('params: ', this.params) // undefined console.log('_id: ', this._id) // undefined } ```