Backgrid integration

2019-06-27 09:36发布

问题:

How I would use backgrid within a backbone.marionette application?

回答1:

It's as simple as it looks. Just add the Backgrid view to any region:

MyApp.addRegions({
  someRegion: "#some-div"
});

var columns ....
var userList ....

MyApp.someRegion.show(
    new Backgrid.Grid({
        columns : columns,
        collection : userList
    })
);