How to use network status check on best way?

Hi, i want to use ionic cordova plugin add cordova-plugin-network-information

How can i make this running whole the time app is up, and redrect to a page that shows user is offline, and when online it automatically redirect to the page user was on?