Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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