Created
April 16, 2011 15:26
-
-
Save bigeasy/923192 to your computer and use it in GitHub Desktop.
Async Eco Template
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
| <html> | |
| <head> | |
| <title>This is a title.</title> | |
| </head> | |
| <body> | |
| <%!= @load "projects", (data) => %> | |
| <h2>Projects</h2> | |
| <% for project in data.projects: %> | |
| <%!= @load "assignments", (data) => %> | |
| <p>I should print out that assignment here.</p> | |
| <% end %> | |
| <% end %> | |
| <p><a href="about.html">About Us</a></p> | |
| <% end %> | |
| </body> | |
| </html> |
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
| method = require("./example") | |
| class Example | |
| load: (type, callback) -> | |
| process.nextTick -> callback({ projects: [ 1, 2, 3] }) | |
| method new Example(), (output) -> console.log output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment