Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. Template.home.onCreated(function() {
  2. this.subscribe('posts');
  3. });
  4.  
  5. Template.home.helpers({
  6. count() {
  7. return Posts.find().count();
  8. }
  9. });
  10.  
  11. Template.home.events({
  12. 'click #increment': function(e) {
  13. e.preventDefault();
  14.  
  15. Meteor.call('addPost');
  16. },
  17.  
  18. 'click #decrement': function(e) {
  19. e.preventDefault();
  20.  
  21. Meteor.call('deletePost');
  22. }
  23. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement