** CommonJS/Browserified simple data view binding, without magic **
This is a quick and light weight vanilla JS way to data bind UI elements.
When paired with ajax forms (check out formie), provides a comprehensive data-binding ui framework without the baggage of a full framework.
Example
Check out example/index.html
, the example javascript for the example page is resources/js/example_src.js
Installation
$ npm install bindie
Binde is a browserified/commonjs javascript module.
Usage
JavaScript
var Bindie = myBindie; var { bindie1;}; //initialize nav component after the dom has loadedwindow;
HTML
Your Page Field 1 Field 2
API
//bind UI elements to JSON from AJAX responsemyBindie; //bind UI elements to JSON from AJAX responsemyBindie; //eventsmyBindie; // callback(binder)myBindie; // callback(data)myBindie; // callback(data)
Development
Make sure you have grunt installed
$ npm install -g grunt-cli
Then run grunt watch
$ grunt watch
For generating documentation
$ grunt doc
$ jsdoc2md lib/**/*.js index.js > doc/api.md
Notes
- The Tab Module uses Node's event Emitter for event handling.
- The Template Generator uses EJS, but you can generate your own mark up