Sha256: fd661f1a7edf7d806873a8116ef299fe2399c7d1e5b336998640863127190a59
Contents?: true
Size: 1.3 KB
Versions: 18
Compression:
Stored size: 1.3 KB
Contents
!(angular => { 'use strict'; function QueryModelImports(QueryResource, ParameterMethods, StandardModel, $q) { return class Query extends StandardModel { constructor() { super( 'query', QueryResource, { title: '', tags: [], version: { body: '', parameters: [] } }, [ 'title', 'version.body', 'roles', 'tags' ] ); } initItem(queryId, queryVersionId) { if (queryId && queryVersionId) { return super.fetch({ id: queryId, version_id: queryVersionId }); } else { this.item = this._newItem(); return $q.when(this.item); } } detectParameters() { ParameterMethods.detectParameters(this.item.version.body, this.item.version.parameters); } addParameter(name) { let parameter = ParameterMethods.constructParameter(name); this.item.version.parameters.push(parameter); } }; } QueryModelImports.$inject = ['QueryResource', 'ParameterMethods', 'StandardModel', '$q']; angular.module('alephServices.query', []).service('Query', QueryModelImports); }(angular));
Version data entries
18 entries across 9 versions & 1 rubygems