Bobun
Bobun is a UI oriented Backbone library. It supports one-way and two-way bindings and sub-views.
Installing
Client side
bower install bobun
Server side
npm install bobun
Bobun.View
append ( view )
Add a view to sub-views, render it, append it to $el
and call delegateEvents
.
mainView;
domEventTriggerProxy ( event )
Provides a way to bind a dom event to a view event.
BobunView;
set, get, validate
Similary to models with attributes
, Bobun.View exposes options
using set
, get
and validate
.
var List = BobunView; var list = ;list;});
bind, bindTo
Thanks to Bobun.Binding, it's possible to bind a view to a model or an other view.
BobunView;
It's possible to bind a model option using a shortcut.
BobunView;
Bobun.Binding
Bobun; modelA; modelB // -> return 'bar'
All methods can be called directly or wrapped (as underscore).
bind( obj, bindedObj, attributes )
Provides a two-way binding.
// simpleBobunBinding;BobunBinding;BobunBinding; // wrappedBobun;...
bindTo( obj, bindedObj, attributes )
Provides a one-way binding.
// simpleBobunBinding;BobunBinding;BobunBinding; // wrappedBobun;...
License
MIT