Подтвердить что ты не робот

Передача параметров Meteor Iron Router для обратного вызова шаблона

Как передать параметры Iron Router на обратный вызов Template.myTemplate.rendered? Следующая функция маршрутизации и обратного вызова дает undefined для 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

}
4b9b3361

Ответ 1

Вы пробовали Router.current(). params?