backbone-childs
v1.0.3
Published
Extended backbone view with support for child views
Downloads
98
Maintainers
Readme
backbone-childs
Extends the default Backbone view with support for subviews (aka child views). It uses backbone-viewj (backbone view with jbone) and doesn't need jQuery nor Zepto as dependecy.
Features
ordering
: (optiona) add this attribute to your view for custom ordering (otherwise it will order after your key)key
access : views are saved in a dictionary
renderSubviews
call this command in your render function to render all subviews.
addView(view,key)
adds a view with key
.
If you don't have a ordering
attribute it will set your key
as ordering attribute.
getView (key)
gets the view with key
.
removeView (key)
removes the view with key
.
removeViews()
destroys all child views.
remove()
destroys this view