UNPKG

govbr-ds-angular

Version:

Implementação em Angular do Design System GovBR.

22 lines (21 loc) 1.06 kB
import * as i0 from "@angular/core"; export declare class LoadingService { loadingSignal: import("@angular/core").WritableSignal<boolean>; /** * Contains in-progress loading requests */ loadingMap: Map<string, boolean>; constructor(); /** * Sets the loadingSub property value based on the following: * - If loading is true, add the provided url to the loadingMap with a true value, set loadingSub value to true * - If loading is false, remove the loadingMap entry and only when the map is empty will we set loadingSub to false * This pattern ensures if there are multiple requests awaiting completion, we don't set loading to false before * other requests have completed. At the moment, this function is only called from the @link{loadingInterceptor} * @param loading {boolean} * @param url {string} */ setLoading(loading: boolean, url?: string): void; static ɵfac: i0.ɵɵFactoryDeclaration<LoadingService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<LoadingService>; }