Last active
December 21, 2015 08:09
-
-
Save CanastaNasty/6276610 to your computer and use it in GitHub Desktop.
This file contains 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
alert("YOLO!") |
This file contains 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
self= | |
files: [ | |
{name: "Data", content: "YOLO!!"} | |
] | |
chosenFile: Observable() | |
self.chosenFile.observe (file) -> | |
alert file.content | |
return self |
This file contains 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
#preview | |
font-family: helvetica | |
padding: 1em |
This file contains 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
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