Skip to content

Instantly share code, notes, and snippets.

@jaunkst
Created January 30, 2015 22:24
Show Gist options
  • Save jaunkst/c5539c5cdec63d6f363b to your computer and use it in GitHub Desktop.
Save jaunkst/c5539c5cdec63d6f363b to your computer and use it in GitHub Desktop.
<todo>
<h3>TODO</h3>
<ul>
<li each={ item, i in items }>{ item }</li>
</ul>
<form onsubmit={ handleSubmit }>
<input>
<button>Add #{ items.length + 1 }</button>
</form>
this.items = []
handleSubmit = (e) ->
var input = e.target[0]
this.items.push(input.value)
input.value = ''
</todo>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment