Created
December 31, 2014 13:35
-
-
Save teaplanet/3cfeba2c9cb032240ef0 to your computer and use it in GitHub Desktop.
Ractive.js Tutorial 7-1
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
<!-- http://learn.ractivejs.org/triples-embedded-html/1 --> | |
<script src='http://cdn.ractivejs.org/latest/ractive.min.js'></script> | |
<div id='container'></div> | |
<script id='template' type='text/ractive'> | |
<p>This is a normal mustache: {{content}}</p> | |
<p>And this is a triple mustache: {{{content}}}</p> | |
</script> |
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 ractive = new Ractive({ | |
el: 'container', | |
template: '#template', | |
data: { | |
content: '<strong>Spot the difference?</strong>' | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment