add comments regarding network plugin usage

This commit is contained in:
Keith D. Moore 2016-03-27 23:17:07 -05:00
parent 4ead1ae023
commit 3b7f7c6533

View File

@ -23,8 +23,10 @@ declare var navigator;
* *
* // watch network for a connection * // watch network for a connection
* let connectSubscription = Network.onConnect().subscribe(() => { * let connectSubscription = Network.onConnect().subscribe(() => {
* console.log('network connected!'); * console.log('network connected!');*
* // use a timeout so that we can determine what type of connection we have * // 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(() => { * setTimeout(() => {
* console.log(Network.connection); * console.log(Network.connection);
* if (Network.connection === Connection.WIFI) { * if (Network.connection === Connection.WIFI) {