Last active
December 31, 2015 20:09
-
-
Save hbi99/8038191 to your computer and use it in GitHub Desktop.
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Defiant.js</title> | |
<script type="text/javascript" src="/res/js/defiant.js"></script> | |
</head> | |
<body> | |
<!-- output element --> | |
<div id="output"></div> | |
<script type="text/javascript"> | |
var data = { "store": { | |
"book": [{ "title": "The Lord of the Rings", | |
"author": "J. R. R. Tolkien", | |
"category": "Fiction", | |
"price": 22.99, | |
}, | |
{ "title": "Moby Dick", | |
"author": "Herman Melville", | |
"category": "Fiction", | |
"price": 8.99 | |
}] | |
} | |
}, | |
htm = Defiant.render('books_template', data); | |
document.getElementById('output').innerHTML = htm; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment