我有用户使用 Twitter 登录 Meteor 应用程序。我想使用 Iron Router 为他们创建一个个人资料页面路由,该路由引用他们的 Twitter 屏幕名称。
我不知道应该用什么替换下面的 Iron Router 代码部分(我的文档:slug
中没有属性)。slug
user
this.route('expertPage', {
path: '/profile/:slug',
data: function() { return Meteor.users.findOne({"services.twitter.screenName": this.params.slug}); }
});