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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -