Skip to content

Instantly share code, notes, and snippets.

@devdays
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devdays/b157dacf805615ea3843 to your computer and use it in GitHub Desktop.
Save devdays/b157dacf805615ea3843 to your computer and use it in GitHub Desktop.
Single Page App - Using Sammy to load products data
this.get('#/products', function (context) {
var products = context.items;
context.app.swap(''); // clear out the $element in this case '#content'
context.render('templates/productsList.html', products)
.appendTo(context.$element());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment