0.0.1 • Published 10 years ago

html-brick v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

html-plugin

Lego plugin to bind a node inner HTML with a store attribute

Installation

with component:

$ component install bredele/html-brick

with nodejs:

$ component install html-brick

Usage

First, add the plugin to your view (see lego to know more about views):

view.add('data-html', require('html-brick'));

Basic

<p data-html="github"></p>

The plugin will look if it finds the property github and listen for changes.

view.set('github', 'bredele');

will display:

<p data-html="github">bredele</p>

see live example

Alternative

lego allows variable substitutions

<p>{{ github }}</p>

License

MIT