Skip to content

Instantly share code, notes, and snippets.

@fwielstra
Created June 13, 2011 10:22
Show Gist options
  • Save fwielstra/1022569 to your computer and use it in GitHub Desktop.
Save fwielstra/1022569 to your computer and use it in GitHub Desktop.
Sammy.js - Load data from an API
this.get('#/', function(context) {
this.load('thread')
.then( function(threads) {
$.each(threads, function(i, thread) {
context.render('templates/thread.template', {thread : thread}).appendTo(context.$element());
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment