Repeat it
Loop over the items of an array store and append bound instances of that element.
Repit has been built for brick and wall but also work as a standalone library.
Installation
with component:
$ component install bredele/repit
with browserify:
$ npm install repit
Standalone
Repit uses cement to sync each item with a datastore.
HTML:
{{ label }}
JavaScript:
var Store = ;var Repeat = ; var data = label: 'bredele' label: 'Calgary'; var list = data;list;
Result:
bredele Calgary
See example.
Brick
Directive:
{{ label }}
Brick:
var brick = ;var repeat = ; var view = ;
repeat
will automatically use the brick data if nothing is passed.
update the ui :
view; view
See example.
Wall
var repeat = ;var wall = ; var app = ;app; app;
See example.
License
MIT