I need to change color for ionic icons based on Network Connectivity
If it connects to Network it need to be in Green color
If it disconnect from network it need to be in red color
and add Online Offline event listener for this purpose
$rootScope.$on(’$cordovaNetwork:online’, function(event, networkState){
//Write the logic to change the style of icon here for online mode
});
// listen for Offline event
$rootScope.$on(’$cordovaNetwork:offline’, function(event, networkState){
//Write the logic to change the style of icon here for offline mode
});