title: How to get JavaScript console error for debugging
body: <p>I am working on an Web Application. I want to capture the console error when network is down or network is slow and response coming from the server is getting slow or taking time.</p>
  <p>Is there any way to capture JavaScript console error and use it with AngularJS?</p>
  <p>Ex. <code>ERR_CONNECTION_REFUSED</code></p>