Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Template.profile.onCreated(function () {
this.subscribe('profile', Router.current().params.username)
})
Template.profile.events({
'click .follow-me': function (event, template) {
console.log(template.data) // null
//Meteor.call('follow', this.user._id);
}
});
Template.profile.helpers({
user: function () {
return Meteor.users.findOne({username: Router.current().params.username})
},
following: function () {
return this.user && _(Meteor.user().profile.followingIds).contains(this.user._id);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.