0.0.2 • Published 11 years ago

hypergluten v0.0.2

Weekly downloads
8
License
-
Repository
github
Last release
11 years ago

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