在辅助函数中,我想根据以下某些条件返回带有数据的模板:
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!