Sha256: 83110a778bf4d2874c45f5f4a2086102287231340d0dc890e5de5ad7e4eb8c88
Contents?: true
Size: 737 Bytes
Versions: 32
Compression:
Stored size: 737 Bytes
Contents
!(angular => { 'use strict'; function ResultPollerImports(PollService) { return class ResultPoller { constructor(result) { this._result = result; } poll() { let result = this._result.item; this.pollingKey = 'result_' + result.id + '_' + new Date().getTime(); PollService.poll( result, this.pollingKey, () => (result.status === 'complete' || result.status === 'failed') ? true : false ); } unPoll() { PollService.unPoll(this.pollingKey); } }; } ResultPollerImports.$inject = ['PollService']; angular.module('alephServices.resultPoller', []).service('ResultPoller', ResultPollerImports); }(angular));
Version data entries
32 entries across 16 versions & 1 rubygems