Closed davis closed 8 years ago
Yes, See docs http://epoxyjs.org/documentation.html#model-mixin and http://epoxyjs.org/documentation.html#view-mixin b ut beware of the target being a prototype, It was confusing to me sometimes
thanks!
Yeah, in my current project, I've created an EpoxyItemView base class using the following code:
function createMarionetteEpoxyMergedView(marionetteClass) {
var mergedClass = marionetteClass.extend({
onItemRendered : function() {
this.applyBindings();
}
});
Backbone.Epoxy.View.mixin(mergedClass.prototype);
return mergedClass;
}
var EpoxyItemView = createMarionetteEpoxyMergedView(Backbone.Marionette.ItemView);
Works great.
For that matter, issue #94 shows some other ways to mix Marionette and Epoxy.
Hello, I am using Marionette's views and would like to have binding on them (but JavaScript doesn't support multiple inheritance). Is there a way to "mix-in" the Epoxy features?