Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to invoke region from layoutview #1

Open
Prasadu112 opened this issue Nov 13, 2017 · 0 comments
Open

How to invoke region from layoutview #1

Prasadu112 opened this issue Nov 13, 2017 · 0 comments

Comments

@Prasadu112
Copy link

""""""""""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 anyone solve with this code how to invoke a region

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant