-
Notifications
You must be signed in to change notification settings - Fork 1
Description
""""""""""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"""""""""""""
//////////////////////////////////////////////////////////////////////
""""""""""""""""" 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
