Sha256: 27dcf2829c8181ba6c1d49d1fd09311f0605f77f8bb7adcf23ec0d96fed5cedc

Contents?: true

Size: 942 Bytes

Versions: 32

Compression:

Stored size: 942 Bytes

Contents

!(angular => {
  'use strict';

  function ModelFactory(StandardModel, StandardCollectionModel) {

    this.makeCollectionModel = function makeCollectionModel(name, Model, resource) {
      return class FactoryCollectionModel extends StandardCollectionModel {
        constructor() {
          super(name, resource, Model);
        }
      };
    };

    this.makeModel = function makeModel(name, newItem, resource, options = {}) {
      let dirtyAwareFields = options.dirtyAwareFields || _.keys(newItem);
      let dirtyAwareComparators = options.dirtyAwareComparators;

      return class FactoryModel extends StandardModel {
        constructor() {
          super(name, resource, newItem, dirtyAwareFields, dirtyAwareComparators);
        }
      };
    };
  }

  ModelFactory.$inject = ['StandardModel', 'StandardCollectionModel'];
  angular.module('modelGeneration.modelFactory', []).service('ModelFactory', ModelFactory);
}(angular));

Version data entries

32 entries across 16 versions & 1 rubygems

Version Path
aleph_analytics-0.4.9.pre.dev public/assets/angular/services/model_generation/model_factory.js-0bccc6a2e9b4738c67230fc68d9780ae.es6
aleph_analytics-0.4.9.pre.dev app/assets/javascripts/angular/services/model_generation/model_factory.js.es6
aleph_analytics-0.4.8 public/assets/angular/services/model_generation/model_factory.js-0bccc6a2e9b4738c67230fc68d9780ae.es6
aleph_analytics-0.4.8 app/assets/javascripts/angular/services/model_generation/model_factory.js.es6
aleph_analytics-0.4.7 app/assets/javascripts/angular/services/model_generation/model_factory.js.es6
aleph_analytics-0.4.7 public/assets/angular/services/model_generation/model_factory.js-0bccc6a2e9b4738c67230fc68d9780ae.es6
aleph_analytics-0.4.4 public/assets/angular/services/model_generation/model_factory.js-0bccc6a2e9b4738c67230fc68d9780ae.es6
aleph_analytics-0.4.4 app/assets/javascripts/angular/services/model_generation/model_factory.js.es6
aleph_analytics-0.4.2 public/assets/angular/services/model_generation/model_factory.js-0bccc6a2e9b4738c67230fc68d9780ae.es6
aleph_analytics-0.4.2 app/assets/javascripts/angular/services/model_generation/model_factory.js.es6
aleph_analytics-0.4.1 public/assets/angular/services/model_generation/model_factory.js-0bccc6a2e9b4738c67230fc68d9780ae.es6
aleph_analytics-0.4.1 app/assets/javascripts/angular/services/model_generation/model_factory.js.es6
aleph_analytics-0.3.0 public/assets/angular/services/model_generation/model_factory.js-0bccc6a2e9b4738c67230fc68d9780ae.es6
aleph_analytics-0.3.0 app/assets/javascripts/angular/services/model_generation/model_factory.js.es6
aleph_analytics-0.2.0 app/assets/javascripts/angular/services/model_generation/model_factory.js.es6
aleph_analytics-0.2.0 public/assets/angular/services/model_generation/model_factory.js-0bccc6a2e9b4738c67230fc68d9780ae.es6
aleph_analytics-0.1.0 public/assets/angular/services/model_generation/model_factory.js-0bccc6a2e9b4738c67230fc68d9780ae.es6
aleph_analytics-0.1.0 app/assets/javascripts/angular/services/model_generation/model_factory.js.es6
aleph_analytics-0.0.6 public/assets/angular/services/model_generation/model_factory.js-0bccc6a2e9b4738c67230fc68d9780ae.es6
aleph_analytics-0.0.6 app/assets/javascripts/angular/services/model_generation/model_factory.js.es6