Skip to content

Instantly share code, notes, and snippets.

@CanastaNasty
Last active December 21, 2015 08:09
Show Gist options
  • Save CanastaNasty/6276610 to your computer and use it in GitHub Desktop.
Save CanastaNasty/6276610 to your computer and use it in GitHub Desktop.
alert("YOLO!")
self=
files: [
{name: "Data", content: "YOLO!!"}
]
chosenFile: Observable()
self.chosenFile.observe (file) ->
alert file.content
return self
#preview
font-family: helvetica
padding: 1em
Choose a file:
%ul
- chosenFile = @chosenFile
- each @files, (file)->
%li= file.name
- on "click", ->
- chosenFile file
%p
- with chosenFile, ->
=@name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment