injectNetworkInformationResource
Provides a reactive Angular Resource (rxResource) for monitoring the device network connection status.
TypeScriptexample.ts
import { injectNetworkInformationResource } from '@angular-helpers/browser-web-apis'# Properties
| Field | Type | Description |
|---|---|---|
resource | ResourceRef<NetworkInformation> | The reactive Angular ResourceRef. |
snapshot | Signal<NetworkInformation | undefined> | The latest snapshot shortcut. |
online | Signal<boolean | undefined> | Whether the device is online. |
effectiveType | Signal<EffectiveConnectionType | undefined> | The effective connection type (e.g. 4g). |
downlink | Signal<number | undefined> | The effective bandwidth estimate in megabits per second. |
rtt | Signal<number | undefined> | The estimated effective round-trip time of the current connection. |
type | Signal<ConnectionType | undefined> | The underlying connection technology (e.g. wifi). |
saveData | Signal<boolean | undefined> | User data-saving mode status. |
isSupported | Signal<boolean> | True when Network Information API is available. |