3 ms·
This is an interesting approach. One downside is that it's much less readable than the Handlebars template. Using Coffeescript for the "templating" functions wo
by bretthopper 15y ago
This is an interesting approach. One downside is that it's much less readable than the Handlebars template. Using Coffeescript for the "templating" functions would actually clean it up a lot.
- perfunctory 15y agoWould you mind posting a Coffeescript snippet to demonstrate that?
- snprbob86 15y agohttp://coffeekup.org/ http://coffeekup.org/
- jacobr 15y agoitems = [ 1, 2, 3, 4 ] el 'div#message', [ el 'a.biglink', href: 'http://www.google.com', [ 'A link to Google' ] el 'ul', el 'li.item', [ "#{item}. Item" ] for item in items 'There are lots of items'.localise() + '. ' if items.length > 1 'This is just plain text. <script>I have no effect</script>' ]