javascript - DOM location of ItemView when passed in CompositeView - Marionette -


i have itemview this:

var userview= marionette.itemview.extend({         template: "#user1",         el: "#imp1"     }); 

question: mean template of itemview: #user1 go (say) div id=imp1 in dom, when rendered?

(if not, guess can use regions render userview in div in dom, fine!)

now, in case of rendering compositeview, use region1.show() compositeview. in case, how can render (childview) itemview of compositeview @ specific location (say div id) in dom.

(as calling region1.show() on compositeview , not on itemview, dont know how render itemview @ specific location on dom)

if itemview compositeview child, cannot render @ specific location in dom. can render on specific location inside compositeview(childviewcontainer), , compositeview render directly dom via region.

so, if want render itemview @ specific location in dom, should use region , itemview, without compositeview.

var myview = new myview(); myregion.show(myview); 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -