Skip to main content

OfflineSyncService

A reactive main-thread service that bridges network status changes to the background Http Web Worker. Monitors navigator.onLine reactively using Angular Signals, counts pending queued offline mutations, and triggers background synchronization on network recovery.

TypeScriptexample.ts
import { OfflineSyncService } from '@angular-helpers/storage'

# Methods

MethodSignatureReturnsDescription
triggerSynctriggerSync(): voidvoidTriggers the offline sync queue draining pipeline in the worker.
checkPendingCountcheckPendingCount(): Promise<number>Promise<number>Manually checks the number of pending queued requests in IndexedDB.
LCP N/A
CLS N/A
INP N/A