mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
26 lines
422 B
TypeScript
26 lines
422 B
TypeScript
import { Injectable } from '@angular/core';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class AppProcessStatusService {
|
|
|
|
status: 'resume' | 'pause' = 'resume'
|
|
|
|
constructor() {
|
|
this.events()
|
|
}
|
|
|
|
private events() {
|
|
document.addEventListener('pause', () => {
|
|
//
|
|
this.status = 'pause'
|
|
});
|
|
|
|
document.addEventListener('resume', () => {
|
|
//
|
|
this.status = 'resume'
|
|
});
|
|
}
|
|
}
|