mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
29 lines
375 B
TypeScript
29 lines
375 B
TypeScript
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()
|
|
}
|
|
|
|
}
|