From 527dd3373c4d4a54a080557408c4786aa7e03f87 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Tue, 9 Jun 2015 16:37:36 +0300 Subject: Client dir --- client/button.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 client/button.js (limited to 'client/button.js') 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 -- cgit v1.3.1