ngx-loading
Version:
A customisable loading spinner for Angular applications.
23 lines • 2.64 kB
JavaScript
import { Inject, Injectable, Optional } from '@angular/core';
import { NgxLoadingConfig } from './ngx-loading-config';
import * as i0 from "@angular/core";
export class NgxLoadingService {
constructor(config) {
this.config = config;
this.loadingConfig = this.config || new NgxLoadingConfig();
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: NgxLoadingService, deps: [{ token: 'loadingConfig', optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: NgxLoadingService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: NgxLoadingService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root',
}]
}], ctorParameters: () => [{ type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: ['loadingConfig']
}] }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWxvYWRpbmcuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1sb2FkaW5nL3NyYy9saWIvbmd4LWxvYWRpbmcuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFN0QsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7O0FBS3hELE1BQU0sT0FBTyxpQkFBaUI7SUFHNUIsWUFDK0MsTUFBeUI7UUFBekIsV0FBTSxHQUFOLE1BQU0sQ0FBbUI7UUFFdEUsSUFBSSxDQUFDLGFBQWEsR0FBRyxJQUFJLENBQUMsT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