Skip to content

Instantly share code, notes, and snippets.

@belackriv
Last active August 3, 2016 13:34
Show Gist options
  • Save belackriv/87cc3fa6ac8811af6a9579992d391555 to your computer and use it in GitHub Desktop.
Save belackriv/87cc3fa6ac8811af6a9579992d391555 to your computer and use it in GitHub Desktop.
'use strict';
import Marionette from 'marionette';
import viewTpl from './boxItemView.hbs!';
import TrashListView from './trashListView.js';
export default Marionette.LayoutView.extend({
template: viewTpl,
tagName: 'li',
regions: {
'trash': '[data-region="trash"]',
},
onRender(){
let trashListView = new TrashListView({
collection: this.model.get('trash'),
});
this.showChildView('trash', trashListView)
},
});
'use strict';
import Marionette from 'marionette';
import BoxItemView from './boxItemView.js';
export default Marionette.CollectionView.extend({
tagName: 'ul',
childView: BoxItemView
});
'use strict';
import Marionette from 'marionette';
import viewTpl from './dumpsterView.hbs!';
import BoxListView from './boxListView.js';
export default Marionette.LayoutView.extend({
template: viewTpl,
regions: {
'boxes': '[data-region="boxes"]',
},
onRender(){
let boxListView = new BoxListView({
collection: this.model.get('boxes'),
});
this.showChildView('boxes', boxListView)
},
});
'use strict';
import Marionette from 'marionette';
import viewTpl from './trashItemView.hbs!';
export default Marionette.LayoutView.extend({
template: viewTpl,
tagName: 'li'
});
'use strict';
import Marionette from 'marionette';
import TrashItemView from './trashItemView.js';
export default Marionette.CollectionView.extend({
tagName: 'ul',
childView: TrashItemView
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment