0.0.2 • Published 12 years ago
hypergluten v0.0.2
hypergluten
HTML data binding on top of hyperglue
Instead of binding data to css selectors data is bound to [data-bind={key}]
for you.
Installation
npm install hyperglutenBasic Use
var g = require('hypergluten');
var html = '<h1 data-bind="title"></h1>';
g(html, { title: 'Hello World!' });<h1 data-bind="title">Hello World!</h1>The rendering is all delegated to hyperglue so providing objects works as you'd expect.
var g = require('hypergluten');
var html = '<img data-bind="thumb">';
g(html, {
thumb: {
src: '/pizza.png'
}
});<img data-bind="thumb" src="/pizza.png">Testing
npm test