html-brick

0.0.1 • Public • Published

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

Package Sidebar

Install

npm i html-brick

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • bredele