import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { LoaderService } from 'src/app/core/common/loader.service';

@Component({
  selector: 'app-loader',
  templateUrl: './loader.component.html',
})
export class LoaderComponent implements OnInit {

  loading: boolean;

  constructor(private loaderService: LoaderService, private cd: ChangeDetectorRef) {


  }
  ngOnInit() {
    this.loaderService.isLoading.subscribe((v) => {
      this.loading = v;
      this.cd.detectChanges();
    });
  }
}
