2w gives you a simple, small, library-agnostic 2-way data binding API, inspired by (but not equal to) angularjs' data binding.
Demos & documentation: http://ezakto.github.io/2w
Just clone the repo:
git clone git@github.com:ezakto/2w.git
And include the lib in your markup:
<script src="2w/lib/2w.min.js"></script>
And that's all. You can now add some controllers:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<script src="2w/lib/2w.min.js"></script>
</head>
<body>
<p data-controller="paragraph">This is an active {{text}}.</p>
<script>
$2w.controller('paragraph', function(p){
p.text = 'text set dynamically';
});
</script>
</body>
</html>
Tested with Firefox 18+, Opera 12.16, Chrome, IE8. Should work with next versions.
Simply install QUnit with bower:
bower install
Then run test/index.html in a local server.