class GelatoView extends Backbone.View {

  constructor(options) {
    super(options);
    this.views = {};
  }

  _handleClickNavigate(event) {
    event.preventDefault();
    let $target = Backbone.$(event.target);
    let href = $target.attr('href');
    let navigate = $target.attr('navigate');
    if (navigate === 'navigate') {
      window.app.router.navigate(href, {trigger: true});
    } else {
      window.app.router.navigate(navigate, {trigger: true});
    }
  }

  _parseTemplate(template, context) {
    return _.isFunction(template) ? template(this.getContext(context)) : template;
  }

  getContext(context) {
    context = $.extend(
      true,
      window.app.context || {},
      context || {}
    );
    context.view = this;
    return context;
  }

  getHeight() {
    return this.$el.height();
  }

  getWidth() {
    return this.$el.width();
  }

  remove() {
    this.removeViews();
    this.stopListening();
    this.undelegateEvents();
    this.$el.find('*').off();
    this.$el.remove();
    return this;
  }

  removeViews() {
    _.forOwn(
      this.views,
      function(view) {
        view.remove();
      }
    );
    return this;
  }

  render() {
    return this.renderTemplate();
  }

  renderTemplate(context) {
    this.$el.attr('data-name', this.name);
    this.$el.html(Backbone.$(this._parseTemplate(this.template, context)));
    this.$el.find('[navigate]').on('click', _.bind(this._handleClickNavigate, this));
    return this;
  }

}

Gelato = Gelato || {};

Gelato.View = GelatoView;

@@ -89,20 +89,25 @@
    this.
-view
+component
 s = %7B%7D;%0A
@@ -897,20 +897,25 @@
 s.remove
-View
+Component
 s();%0A   
@@ -1049,20 +1049,25 @@
   remove
-View
+Component
 s() %7B%0A  
@@ -1089,20 +1089,25 @@
    this.
-view
+component
 s,%0A     
@@ -1116,20 +1116,25 @@
 unction(
-view
+component
 ) %7B%0A    
@@ -1137,20 +1137,25 @@
         
-view
+component
 .remove(
@@ -1242,24 +1242,177 @@
 ate();%0A  %7D%0A%0A
+  renderComponents() %7B%0A    _.forOwn(%0A      this.components,%0A      function(component) %7B%0A        component.render();%0A      %7D%0A    );%0A    return this;%0A  %7D%0A%0A
   renderTemp
@@ -1628,24 +1628,80 @@
 te, this));%0A
+    this.delegateEvents();%0A    this.renderComponents();%0A
     return t

Allow all types of views to have components.