Created
December 19, 2014 01:25
-
-
Save devdays/ac1daf88515050e5880f to your computer and use it in GitHub Desktop.
Single Page App - Sammy Route Code
This file contains 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
this.get('#/products', function (context) { | |
var products = context.items; | |
// clear out the $element in this case '#content' | |
context.app.swap(''); | |
// Uses the plugin to transform the template with the products data | |
// then appends it to the $element | |
context.render('templates/4-products.html', products) | |
.appendTo(context.$element()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment