marionette-htmlbars
v0.0.1
Published
This is an experiment to make Marionette work with HTMLBars.
Downloads
5
Readme
Marionette HTMLBars
This is an experiment to make Marionette work with HTMLBars.
Features
- Lazy efficient rerendering
let View = HTMLBarsView.extend({
collectionEvents: {
'sort': 'render'
}
});
- Region autobinding [Partially working]
<div {{region name="regionName"}}></div>
let View = HTMLBarsView.extend({
onRender() {
this.showChildView('regionName', new OtherView());
}
});
- Actions autobinding
<button {{action "click" "remove"}}>Remove item</button>
let View = HTMLBarsView.extend({
remove() {
this.model.remove();
}
});
- UI Autobinding
<section {{ui "sectionElement"}}>My Element</section>
let View = HTMLBarsView.extend({
onSomeTrigger() {
this.ui.sectionElemnt.toggle();
}
});
Demo
npm install
npm run build
live-server
Navigate to the /demo
folder