lib/definitions/collection.js
function (viewBuilder) {
    if (!viewBuilder || !_.isObject(viewBuilder)) {
      var err = new Error('Please inject a valid view builder object!');
      debug(err);
      throw err;
    }
    if (viewBuilder.payload === null || viewBuilder.payload === undefined) {
      viewBuilder.payload = this.defaultPayload;
    }
    if (this.viewBuilders.indexOf(viewBuilder) < 0) {
      viewBuilder.useCollection(this);
      this.viewBuilders.push(viewBuilder);
    }
  }
function (viewBuilder) {
    if (!viewBuilder || !_.isObject(viewBuilder)) {
      var err = new Error('Please inject a valid view builder object!');
      debug(err);
      throw err;
    }
    if (viewBuilder.payload === null || viewBuilder.payload === undefined) {
      viewBuilder.payload = this.defaultPayload;
    }
    if (this.viewBuilders.indexOf(viewBuilder) < 0) {
      viewBuilder.useCollection(this);
      this.viewBuilders.push(viewBuilder);
    }
  }
function ( viewBuilder ) { if ( ! viewBuilder || ! _ . isObject ( viewBuilder ) ) { var err = new Error ( 'Please inject a valid view builder object!' ) ; debug ( err ) ; throw err ; } if ( viewBuilder . payload === null || viewBuilder . payload === undefined ) { viewBuilder . payload = this . defaultPayload ; } if ( this . viewBuilders . indexOf ( viewBuilder ) < 0 ) { viewBuilder . useCollection ( this ) ; this . viewBuilders . push ( viewBuilder ) ; } }
Add viewBuilder module.
@param {ViewBuilder} viewBuilder The viewBuilder module to be injected.
Add viewBuilder module .