import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class LoaderService {

  private loadingList: {
    name: string
  }[] = []

  constructor() { }

  get loading(){
    return this.loadingList.length != 0
  }

  push({name = ''}) {
    this.loadingList.push({
      name: name
    })
  }

  pop({}) {
    this.loadingList.pop()
  }

}
