title: How to use http referrer in angular 2?
body: <p>I have a view in my Angular4 project which is redirected only from my express server. I don't want to allow users to the view other way.  </p>
  
  <p>I find a way to do this using HTTP referrer. In JavaScript Http referrer is used like following. How can use it in Angular4?</p>
  
  <pre><code>if (document.referrer) {
    var myReferer = document.referrer;
    document.write(myReferer);
  }
  </code></pre>