attr-brick

0.0.1 • Public • Published

attr-plugin

Lego plugin to bind a node attribute with a store attribute

Installation

with component:

$ component install bredele/attr-brick

with nodejs:

$ component install attr-brick

Usage

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

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

Basic

<a data-attr="href, github"></a>

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

view.set('github', 'http://github.com/bredele');

will display:

<a href="http://github.com/bredele"></a>

see live example

Alternative

lego allows variable substitutions

<a href="{{ github }}"></a>

License

MIT

/attr-brick/

    Package Sidebar

    Install

    npm i attr-brick

    Weekly Downloads

    12

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • bredele