Skip to content

Instantly share code, notes, and snippets.

@wstam88
Forked from suranyami/index.html
Created December 22, 2016 21:52
Show Gist options
  • Save wstam88/efd85db6ac7950107faecaf4ab60d632 to your computer and use it in GitHub Desktop.
Save wstam88/efd85db6ac7950107faecaf4ab60d632 to your computer and use it in GitHub Desktop.
Minimal Rivets.js example
<div id="details">
<h1 id='head'>{user.firstName}</h1>
<h2 rv-text='user.surname'></h2>
<input id='input' type='text' rv-value="user.firstName">
</div>
<script src='rivets.js'></script>
<script>
var user = {
firstName: 'Fred',
surname: 'Nurk',
};
rivets.bind(document.getElementById('details'), {user: user})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment