Skip to content

bredele/attr-brick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

attr-plugin

Brick 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 brick 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

brick allows variable substitutions

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

License

MIT

About

Brick plugin to bind a node attribute with a store attribute

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published