0.0.1 • Published 10 years ago
marionette-htmlbars v0.0.1
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-serverNavigate to the /demo folder
0.0.1
10 years ago