import { Injectable } from '@angular/core' ; import { Observable , Subject } from 'rxjs' ; /**
 * Spinner service
 */ @ Injectable ( { providedIn : 'root' , } ) export class SpinnerService { private spinnerSubject : Subject < Boolean > = new Subject ( ) ; param status public setProgressBar ( status ) { this . spinnerSubject . next ( status ) ; } /**
     * Returns the status of progress bar to main component
     */ public getProgressBar ( ) { return this . spinnerSubject . asObservable ( ) ; } }