html-brick
v0.0.1
Published
Lego plugin to bind a node innerHTML to a store attribute
Downloads
3
Readme
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