title: adding controller specific document eventlistener in angular
body: <p>I am developing a web application for conducting the online quiz. I am using the mean stack for this. In  my online test controller, I have used many event listeners  such as </p>
  
  <pre><code>document.addEventListener("visibilitychange", onchange);
  document.webkitIsFullScreen etc..
  </code></pre>
  
  <p>But my problem is this function still executing after moving to other controllers Because this is global eventLisners. </p>
  
  <p>Can anyone suggest me best approach for this?</p>