Skip to content

Instantly share code, notes, and snippets.

@denisraslov
Last active September 7, 2017 20:24
Show Gist options
  • Save denisraslov/f8a1d19c3cc0e4dede61dd1648650789 to your computer and use it in GitHub Desktop.
Save denisraslov/f8a1d19c3cc0e4dede61dd1648650789 to your computer and use it in GitHub Desktop.
import Header from 'views/header';
import Content from 'views/content';
import Footer from 'views/footer';
const Page = Backbone.View.extend({
render() {
const attributes = this.model.attributes;
this.headerView = new Header(this.$('.header'), attributes);
this.contentView = new Content(this.$('.content'), attributes);
this.footerView = new Footer(this.$('.footer'), attributes);
this.headerView.render();
this.contentView.render();
this.footerView.render();
return this;
}
});
const pageView = new Page($('.page'));
pageView.render();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment