Network connection detection ionic 2


#1

I can subscribe to onConnect and onDisconnect to detect network changes. How can I tell if I’m connected even before subscription.
The issue here is that I embed youtube iFrame when I try to view it without connection it shows network error, page cannot be found. I want to replace this with appropriate error or display an image.


#2

How should this work? You obviously have to run some code to get the current network status.