-
Book Overview & Buying
-
Table Of Contents
Getting Started with Ionic
By :
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:
Method Name: getNetwork()
Returns: The 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 connection |
|
|
Cell 3G connection |
|
|
Cell 4G connection |
|
|
Cell generic connection |
|
|
No network connection |
Method Name: isOnline()
Returns: Boolean (true if network is online)
Method...
Change the font size
Change margin width
Change background colour