File

projects/maplander/core/src/lib/interceptors/loader/loader.service.ts

Index

Properties
Methods

Constructor

constructor()

Methods

Public getProgress
getProgress()
Returns : Observable<boolean>
Public setProgress
setProgress(load: boolean)
Parameters :
Name Type Optional
load boolean No
Returns : void

Properties

Private _observer
Type : Subject<boolean>
import {Injectable} from '@angular/core';
import {Observable, Subject} from 'rxjs';

@Injectable()
export class LoaderService {

  private _observer: Subject<boolean>;

  constructor() {
    this._observer = new Subject<boolean>();
  }

  public setProgress(load: boolean): void {
    this._observer.next(load);
  }

  public getProgress(): Observable<boolean> {
    return this._observer.asObservable();
  }
}

result-matching ""

    No results matching ""