Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Template.home.onCreated(function() {
- this.subscribe('posts');
- });
- Template.home.helpers({
- count() {
- return Posts.find().count();
- }
- });
- Template.home.events({
- 'click #increment': function(e) {
- e.preventDefault();
- Meteor.call('addPost');
- },
- 'click #decrement': function(e) {
- e.preventDefault();
- Meteor.call('deletePost');
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement