Select Git revision
-
Montaño Sarria, Andres Felipe authoredMontaño Sarria, Andres Felipe authored
loader.service.ts 386 B
import { Injectable } from '@angular/core';
import { BehaviorSubject, Subject } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class LoaderService {
isLoading$ = new BehaviorSubject<boolean>(false);
loader = this.isLoading$.asObservable();
constructor() { }
show() {
this.isLoading$.next(true);
}
hide() {
this.isLoading$.next(false);
}
}