Created
September 18, 2014 07:55
-
-
Save suranyami/5534458920fa843b92db to your computer and use it in GitHub Desktop.
Minimal Rivets.js example
This file contains hidden or 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
<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