Skip to content

ConnectionService

injectable

Service to monitor the online/offline state of the application. It listens to the browser’s online and offline events and provides an observable to track the current connection state.

An observable connection$ is provided which emits the current connection state whenever the online or offline state changes. The initial state is determined by the window.navigator.onLine property.