Sha256: c1e06944f9d1d70e7dbc126364f27b835a043cd5a4483a628567b458156d1cca
Contents?: true
Size: 795 Bytes
Versions: 32
Compression:
Stored size: 795 Bytes
Contents
!(angular => { 'use strict'; class ResourceFactory { constructor($resource) { this._defaultActions = { update: { method: 'PUT' }, create: { method: 'POST' }, show: { method: 'GET' }, index: { method: 'GET', isArray: true, responseType: 'json' }, destroy: { method: 'DELETE' } }; this._$resource = $resource; } make(path, parameters, actions = {}) { return this._$resource(path, parameters, _.merge(this._defaultActions, actions)); } } ResourceFactory.$inject = ['$resource']; angular.module('modelGeneration.resourceFactory', []).service('ResourceFactory', ResourceFactory); }(angular));
Version data entries
32 entries across 16 versions & 1 rubygems