Skip to content

Instantly share code, notes, and snippets.

@teaplanet
Created December 31, 2014 13:35
Show Gist options
  • Save teaplanet/3cfeba2c9cb032240ef0 to your computer and use it in GitHub Desktop.
Save teaplanet/3cfeba2c9cb032240ef0 to your computer and use it in GitHub Desktop.
Ractive.js Tutorial 7-1
<!-- 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>
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