Global listener for network status
<p>In which way I can do a <strong>global</strong> listener(or whatever) checking if we have internet connection visible in <strong>whole app</strong> no matter what controller I'm in and inside it using function showing simple angular material Alert in every app view.</p>

<p>So if I need to invoke this in any controller, I guess there's another way to do this, but I dont know how.</p>

<p>listener I wrote using addEventListener way.</p>