Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Template.profile.onCreated(function () {
  2. this.subscribe('profile', Router.current().params.username)
  3. })
  4.  
  5. Template.profile.events({
  6. 'click .follow-me': function (event, template) {
  7. console.log(template.data) // null
  8. //Meteor.call('follow', this.user._id);
  9. }
  10. });
  11.  
  12. Template.profile.helpers({
  13. user: function () {
  14. return Meteor.users.findOne({username: Router.current().params.username})
  15. },
  16. following: function () {
  17. return this.user && _(Meteor.user().profile.followingIds).contains(this.user._id);
  18. }
  19. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement