backbone.js - How to attach Backbone.Marionette view to existing element without creating extra element -


say have these 2 backbone.marionette views:

var fooview = backbone.marionette.itemview.extend({   tagname: p,   id: 'foo',   template: this.templates.summary });  var barview = backbone.marionette.itemview.extend({   template: this.templates.summary }); 

and want show them inside app region, so:

app.contentregion.show(new fooview/barview()); 

the first view create new

element , append region. thought second way more standard backbone view , attach region without creating new element, wraps in tag. there way avoid without using setelement()?

for this, should use attachview method: https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.region.md#call-attachview-on-region


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -