How to Lock Ionic App When Internet Is Off

I am currently making a ionic app for my website. The app will pull info from my website to display inside the app like newest articles and news. This needs internet access but I like to lock my app and prevent from running when there is no internet plus display message why the app is not running.

Is there a way or plugin for ionic that can do this.

If anyone can help me with this I really appreciate it.