Last active
August 29, 2015 14:06
-
-
Save potch/52185d3479e8c9b79852 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
` | |
<h2>Messages (${ messages.length }):</h2> | |
<ul> | |
${ messages.map(((msg, i) => ` | |
<li class="${ i % 2 ? 'odd' : 'even' }"> | |
${ msg.subject } | |
${ msg.read ? | |
`this message is read` | |
: | |
`this message is unread` | |
} | |
</li> | |
`)).join('') } | |
</ul> | |
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ES6 templating idea I've been kicking around my head. Not even close to elegant or production ready.