title: Angular Guards: Prevent manually accessing a URL
body: <p>We have several routes in our app which are not supposed to be navigated by the user by directly entering their URLs into the browser’s address bar.</p>
  
  <p>Instead we only want to make them accessible when we programmatically navigate using <code>router.navigate()</code> through our application logic.</p>
  
  <p>Using Angular’s <code>CanActivate</code> guard, is there some flag or attribute which we could use to distinguish between those two cases:</p>
  
  <ol>
  <li><p>Route is being accessed directly as the user typed <code>/no/direct/access</code> into the address bar</p></li>
  <li><p>Route is being accessed via <code>router.navigate(['/', 'no', 'direct', 'access'])</code> (which might in turn be triggered by a different guard, so <code>router.navigated</code> unfortunately doesn’t seem to help here)</p></li>
  </ol>