【发布时间】:2015-07-21 12:00:42
【问题描述】:
我有一个路由器定义如下
Router.route('/profile/:input',function(){
this.render('profile');
});
所以我可以通过调用this.params.input 来获取input 的值。我想在 MongoDB 上查询这个值并传递给模板 Profile。但是我怎样才能将这些信息从路由器交换到助手?
if (Meteor.isClient) {
Template.profile.helpers({
data: function(){
//what to do?!
}
});
}
【问题讨论】:
标签: node.js mongodb meteor iron-router