将Meteor的铁路由器参数传递给模板回调

Nyx*_*nyx 10 javascript node.js meteor

如何将Iron Router参数传递给Template.myTemplate.rendered回调?以下路由和回调函数给出undefined了两者console.log.

网址

http://localhost:3000/story/1234
Run Code Online (Sandbox Code Playgroud)

Router.js

Router.map( function() {

    this.route('story', {
        path: '/story/:_id',
        template: 'story'
    })

})
Run Code Online (Sandbox Code Playgroud)

story.js

Template.story.rendered = function () {

    console.log('params: ', this.params)    // undefined
    console.log('_id: ', this._id)    // undefined

}
Run Code Online (Sandbox Code Playgroud)

nic*_*ine 25

你试过Router.current().params?