Meteor 0.9:使用帮助程序返回带有数据的模板?

时间:2014-10-02 10:33:53

标签: meteor iron-router meteor-blaze

在辅助函数中,我想根据以下某些条件返回带有数据的模板:

if(this.notificationType == 'QUESTION') {
var question = Question.findOne(this.objectId);
//I want to to pass the data here !
return Tempalte.displayQuestion
}

if(this.notificationType == 'ANSWER') {
var answer= ANSWERS.findOne(this.objectId);
//I want to to pass the answer data here !
return Tempalte.displayAnswer
}

怎么可能做这样的事情? THX!

0 个答案:

没有答案