title: How to use the events 'pause' and 'resume' in an Angular/Ionic project?
body: <p>In an Angular/Ionic project, where would I use the following attributes to appropriately handle my needs?</p>
  
  <pre><code>document.addEventListener('pause', actiontobeperformed, false);
  document.addEventListener('resume', actiontobeperformed , false);
  </code></pre>
  
  <p><em>My needs are:</em></p>
  
  <p>I am building an app that is protected, meaning that you can only view the content when:</p>
  
  <p>you enter the correct access code
  your session has not timed out
  But when you go to Home, then I want somehow to record that the session is over and that the user needs to authenticate when he comes back in the app.</p>