I have develop an application with Ionic and everything works great.
Until now in every controller use a factory to check internet connection and then if there is no internet redirect the user to a specific view.
What i want to do is instead of using it in every controller, place it somewhere like inside run, so that every view will use it from there. I want if someone choose an option from the sidemenu and there is no internet to redirect him but not detect live if he loose his connection. Just only if he select an option.
I tried the $http interceptor but i did not managed to make it work.
Thanks in advanced!