mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-01 02:53:03 +08:00
add comments regarding network plugin usage
This commit is contained in:
parent
4ead1ae023
commit
3b7f7c6533
@ -23,8 +23,10 @@ declare var navigator;
|
||||
*
|
||||
* // watch network for a connection
|
||||
* let connectSubscription = Network.onConnect().subscribe(() => {
|
||||
* console.log('network connected!');
|
||||
* // use a timeout so that we can determine what type of connection we have
|
||||
* console.log('network connected!');
*
|
||||
* // We just got a connection but we need to wait briefly
|
||||
*
// before we determine the connection type. Might need to wait
|
||||
* // prior to doing any api requests as well.
|
||||
* setTimeout(() => {
|
||||
* console.log(Network.connection);
|
||||
* if (Network.connection === Connection.WIFI) {
|
||||
|
Loading…
Reference in New Issue
Block a user