backbone.js - Using regions in a CompositeView for subview -
i'm using compositeview create grid of images had events on it. how looks like:
backbone.marionette.compositeview.extend({ events: { 'click li.feed-thumb': 'clickelement', }, template: _.template(template), itemview: itemfeedview, itemviewcontainer: "#feed ul.feed", clickelement: function(event) { var profile = new profilefeedview(); } });
my template compositeview contains <li>
element render profile when click on image. use same <li>
events of click image. handle region, because understand doing region marionette handle opening , closing of views.
i think compositeview not support regions: {profileregion: '#feed-profile'}
, what's options?
thanks in advance!
you should use layout view in can specify many regions want, can create list region in can put composite view , profile region in can put item view render profile.
Comments
Post a Comment