Is there a way to access the app.vent from Marionette.ItemView?
One solution might be to pass a parameter (app.vent
) to Marionette.ItemView
from Marionette.CompositeView
.
Here's the code snippet:
// view/compositeView.js
define([
'marionette',
'views/item'
], function (Marionette, itemView) {
var ListView = Marionette.CompositeView.extend({
itemView: itemView
});
});
Any thoughts on this?
P.S.:
I'm unable to access the app from itemView due to a circular dependency issue.
app -> view/compositeView -> view/itemView