Tuesday 15 September 2015

javascript - Backbone Marionette: can I supply options to a collectionView's emptyView? -


The scenario is: I have a collectionView which is used in some places

I really want to extend this customization to emptyView

/ code>, but I can not find any way to do this. There is no reference to emptyView on collectionView , and I emptyView to collectionView , out of defining it.

Actually, I want to be able to do something like this:

  var noItemsView = backbone.mirinet.impleplay. ({TagName: "li", className: "no-results", Template: Handlbarskcom (noResultsTemplate),}), leftToggleListView = Backbone.Marionette.CollectionView.extend ({tagname: "ul", className: "left - Toggle-view-list ", empty view: see nightmimes, start: function () {this.emptyView.model.set (" name ":" some custom name ");}});   

and then noItemsView should be able to render {{name}} within your template.

Is there any way to accomplish this, lack of modification of the meriannet? Actually you can enter empty view like this:

 

Code> this.children._views [_key (this.children._views) [0]];

In the new version, it seems that we have a way that allows to get a emptyView .

No comments:

Post a Comment