【发布时间】:2015-12-03 02:42:12
【问题描述】:
我是 Meteor 的初学者,我想使用 Iron:router 向我的应用程序中的动态生成页面发送邀请链接。
Meteor.methods({
'sendEmail': function(to) {
this.unblock();
SSR.compileTemplate( 'emailText', Assets.getText( 'html-email.html' ) );
Template.emailText.helpers({
link: function () {
return Router.current().route.path(this);;
}
});
Email.send({
to:to,
from: 'no-reply@whatever.xyz',
subject:'xyz wants to invite you ',
html: SSR.render('emailText')
});
}})
}
问题是我没有在我的html-email.html 中获得该网站的网址。我得到了
<a href="{{link}}">Link to invitation</a>
我做错了什么?
【问题讨论】:
标签: email meteor iron-router