Simple plugin that returns the internet status. (Android and iOS)
$ cordova plugin add cordova-plugin-internet-status
internet.getStatus(function(status) {
switch(status) {
case internet.CONNECTED: console.log('Connected !'); break;
case internet.DISCONNECTED: console.log('Disconnected...');
}
});