Skip to content

Add a .tpl.coffee format so events and helpers can live together in one file#2

Open
tdamsma wants to merge 3 commits intofoxbenjaminfox:masterfrom
tdamsma:master
Open

Add a .tpl.coffee format so events and helpers can live together in one file#2
tdamsma wants to merge 3 commits intofoxbenjaminfox:masterfrom
tdamsma:master

Conversation

@tdamsma
Copy link

@tdamsma tdamsma commented Aug 12, 2015

I added a .tpl.coffee format that allows all coffeescript for a particular template to live together in one file like so:

hello.tpl.coffee:

events
  'click button': () -> 
    Session.set 'counter', Session.get('counter') + 1

helpers
  counter: () ->
    return Session.get('counter');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant