Network State Change

Hi,
How can i detect the network state change and disable certain functionality. I need to check this in all the views. any working solutions? Please advice

Thanks in advance.

You can use the Network plugin. I would reccomend to use the ngCordova wrapper for Network.

It has methods called getNetwork(), isOnline() and isOffline() try this.

hope it hepled!

As @BioPhoton said, you can use the cordova network plugin. I actually wrote a step by step tutorial on how to create an application that uses this plugin, and you can take a look at it here: http://www.nikola-breznjak.com/blog/codeproject/check-network-information-change-with-ionic-famework/.

Please let me know if it will prove to be helpful to you.