Marionette View appendHtml composition not activated
Consider the following composite view of Marionette. Does anyone know the appendHtml event is not firing:
var TreeView = Backbone.Marionette.CompositeView.extend({
template: "#node-template",
tagName: "ul",
initialize: function(){
this.collection = this.model.nodes;
},
appendHtml: function(collectionView, itemView){
alert('appendHtml triggered');
collectionView.$("li:first").append(itemView.el);
}
});
see the warning ('appendHtml triggered'); Why doesn't it work? Has it been removed?
+3
user3018765
source
to share
1 answer
Take a look at the docs . Depending on the version of Marionette you are using. Use attachHtml ()
+4
Alex shilman
source
to share