I have a layout view with a region, in that region I have a item view that triggers an event but it doesn\'t seem to be bubbled up to the layout view. Am I doing something wron
Why not just allow the click event to bubble up the DOM hierarchy and handle it in your Layout view? Something like this (fiddle here):
var MainView = Marionette.Layout.extend({
template: "#layout-template",
regions: {
childRegion: "#childRegion"
},
events: {
'click #btn': 'handleButtonClick'
},
handleButtonClick: function() {
alert('btn clicked in child region and bubbled up to layout');
}
});
var ChildView = Marionette.ItemView.extend({
template: "#child-template"
/*
triggers: {
"click #btn": "btn:clicked"
}*/
});