From 3b7f7c653359ba0edb76938f94d8e0a26a5eb78e Mon Sep 17 00:00:00 2001 From: "Keith D. Moore" Date: Sun, 27 Mar 2016 23:17:07 -0500 Subject: [PATCH] add comments regarding network plugin usage --- src/plugins/network.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/network.ts b/src/plugins/network.ts index b3c6578a2..31d47ff5f 100644 --- a/src/plugins/network.ts +++ b/src/plugins/network.ts @@ -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) {