mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Sql bug fixed
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BehaviorSubject, Observable } from 'rxjs'
|
||||
import { Platform } from '@ionic/angular'
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
|
||||
export class NetworkConnectionService {
|
||||
online: boolean = true;
|
||||
|
||||
constructor(){}
|
||||
|
||||
checkOnline() {
|
||||
window.addEventListener('online', (on) => {
|
||||
this.online === true;
|
||||
console.log('Became online');
|
||||
});
|
||||
}
|
||||
|
||||
checkOffline() {
|
||||
window.addEventListener('offline', (off) => {
|
||||
this.online === false;
|
||||
console.log('Became offline')
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user