diff options
Diffstat (limited to 'client/button.js')
| -rw-r--r-- | client/button.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/client/button.js b/client/button.js new file mode 100644 index 0000000..8dc64a5 --- /dev/null +++ b/client/button.js @@ -0,0 +1,13 @@ +Session.setDefault('counter', 0); + +Template.hello.helpers({ + counter: function () { + return Session.get('counter'); + } +}); + +Template.hello.events({ + 'click button': function () { + Session.set('counter', Session.get('counter') + 1); + } +});
\ No newline at end of file |
