How to use the view.call function in view

To help you get started, we’ve selected a few view examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DemocracyOS / bill-tracker / lib / dashboard / view.js View on Github external
function Dashboard() {
  if (!(this instanceof Dashboard)) {
    return new Dashboard();
  }

  // Define template
  View.call(this, template);


/**
 * Model of each item on the list.
 * @type {Array}
 */
  this.items = [];

  this.loadItems();
}
github DemocracyOS / bill-tracker / lib / bill-diff / view.js View on Github external
function DiffView() {
  if (!this instanceof DiffView) {
    return new DiffView();
  }

  View.call(this, template);
  this.sections = [];
}
github DemocracyOS / hub / lib / deployment-view / view.js View on Github external
function DeploymentView(locals) {
  if (!(this instanceof DeploymentView)) {
    return new DeploymentView(name);
  };

  View.call(this, template, locals);

  this.url = locals.url;
}
github DemocracyOS / hub / lib / header / view.js View on Github external
function HeaderView() {
  View.call(this, template);

  this.user = this.el.find('.user');
}
github DemocracyOS / hub / lib / dashboard / view.js View on Github external
function Dashboard() {
  if (!(this instanceof Dashboard)) {
    return new Dashboard();
  };

  View.call(this, template, { motto: t('dashboard.motto') });

  /**
   * DOM elements
   */

  this.elDeployments = this.el.find('.deployments')[0];

  /**
   * View model
   */

  this.deployments = [];

  /**
   * Startup
   */
github component / view / examples / todo.html View on Github external
function ItemView(item) {
        var element = tmpl.cloneNode(true);
        element.querySelector('.name').textContent = item.name;
        View.call(this, item, element);
        this.bind('click .remove', 'remove');
        this.bind('click .done', 'complete');
      }

view

A View engine

MIT
Latest version published 8 years ago

Package Health Score

36 / 100
Full package analysis

Popular view functions