Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Single Page App - Load Product Data
this.get('#/products/:id', function (context) {
var param = context.params['id'];
var products = context.items.products;
if (!products[param]) {
return context.notFound();
}
context.partial('Templates/productDetail.html', products[param]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment