hypergluten
v0.0.2
Published
HTML data binding
Downloads
8
Readme
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 hypergluten
Basic 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