Our team has developed an Angular2 Cordova application (not Ionic) that interacts with multiple backend services.
We want the app to display a specific page (Component) if a user is offline. Although we have already created this feature, we are unsure of how to detect connectivity and trigger the display of the page.
Since the app is built in TypeScript, I initially considered adding code to the index.ts file to achieve this functionality. However, I quickly realized that the index.ts file does not comprehend the app's navigation system, making it difficult to modify the page.
While I understand the use of the Cordova Network Information plugin for checking connectivity, I am struggling to integrate it into the app so that it can automatically switch to the appropriate component when needed.