June 2017
Intermediate to advanced
544 pages
12h 25m
English
The network device plugin helps in identifying the network on which the device is connected and listening to network change events. The $cordovaNetwork is a service of the ngCordova module, which exposes multiple methods and events for managing the network.
The command line to be executed using the Ionic/Cordova CLI is:
cordova plugin add cordova-plugin-network-information
The methods available under this service are:
getNetwork()Connection object (this property determines the connection state and connection type)The possible connection types can be:
|
Type |
Description |
|---|---|
|
|
Unknown connection |
|
|
Ethernet connection |
|
|
Wi-Fi connection |
|
|
Cell 2G ... |
Read now
Unlock full access