One place that is always invoked

Hi All,

I am using Ionic 2.

In the app I am writing, I check if the user has an internet connection and their GPS enabled. If it is not, I display a message.

Is there a single place in the app I can put this code, that it will always get checked? Or do I need to put this call on each page I want to check?

Thanks