I would like to access the app.vent from Marionette.ItemView.
Maybe an option could be to pass a parameter (app.vent
) to Marionette.ItemView
from Marionette.CompositeView
.
Here my code:
// view/compositeView.js
define([
'marionette',
'views/item'
], function (Marionette, itemView) {
var ListView = Marionette.CompositeView.extend({
itemView: itemView
});
});
Any ideas?
P.S.:
I cannot access the app from itemView because there is a problem of circular dependency.
app -> view/compositeView -> view/itemView