Created
December 23, 2011 17:36
-
-
Save romuloccomp/1514871 to your computer and use it in GitHub Desktop.
Sample js Handlebars
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
var source = $("#some-template").html(); | |
var template = Handlebars.compile(source); | |
var data = { users: [ | |
{username: "alan", firstName: "Alan", lastName: "Johnson", email: "[email protected]" }, | |
{username: "allison", firstName: "Allison", lastName: "House", email: "[email protected]" }, | |
{username: "ryan", firstName: "Ryan", lastName: "Carson", email: "[email protected]" } | |
]}; | |
$("#content-placeholder").html(template(data)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment