Apollo-Player icon indicating copy to clipboard operation
Apollo-Player copied to clipboard

how to invoke a region with the layoutview

Open Prasadu112 opened this issue 8 years ago • 0 comments

""""""""""drive.js""""""""""""""""

var MenuView=Backbone.View.extend({

render:function(){ this.$el.html("this is menu part"); return this; } }); var ContentView=Backbone.View.extend({

render:function(){
   this.$el.html("This is content view");
    return this;
}

}); var AppLaoutView=Marionette.LayoutView.extend({ template:$("#inputtemplate"), render:function(){ this.$el.html("this is layout view"); }, regions:{ menu:"#menu", content:"#content" } }); var applayout=new AppLaoutView({el:"#inputcontent"}); applayout.render();

applayout.getRegion('menu').show(new MenuView()); applayout.getRegion('content').show(new ContentView());

////////////////////////////////////////////////////////////////////////////// """"""""input.html"""""""""""""

image

//////////////////////////////////////////////////////////////////////

""""""""""""""""" error"""""""""""""""""""""""""""

backbone.marionette.min.js:21 Uncaught constructor {name: "Error", message: "An "el" #menu must exist in DOM", stack: "Error: An "el" #menu must exist in DOM↵ at cons… at file:///C:/nodehttp/final/js/driver.js:127:29"}message: "An "el" #menu must exist in DOM"name: "Error"stack: "Error: An "el" #menu must exist in DOM↵ at constructor._ensureElement (file:///C:/nodehttp/Bookstore/Source%20Code/js/Libraries/backbone.marionette.min.js:21:13472)↵ at constructor.show (file:///C:/nodehttp/Bookstore/Source%20Code/js/Libraries/backbone.marionette.min.js:21:11800)↵ at file:///C:/nodehttp/final/js/driver.js:127:29"proto: Error _ensureElement @ backbone.marionette.min.js:21 show @ backbone.marionette.min.js:21 (anonymous) @ driver.js:127

////////////////////////////////

can u solve me with this code how to invoke a region

Prasadu112 avatar Nov 13 '17 05:11 Prasadu112