Skip to content
Snippets Groups Projects
Select Git revision
  • c616a4901309aab02dc1a60a766689dc6e67ed3d
  • master default
2 results

loader.service.ts

Blame
  • 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);
     
        
      }
    }