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