Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement