title: how to implement window.open kind of functionality in Angular 4
body: <p>How do you implement <code>window.open()</code> kind of functionality in Angular 4?</p>
  
  <pre class="lang-js prettyprint-override"><code>function open(){
      var URL = "file:///C:\data2.pdf";
  
      window.open(URL, null);
  }
  </code></pre>
  
  <p>I am getting the below error message: </p>
  
  <blockquote>
    <p>Cannot open local file - Chrome: Not allowed to load local resource.</p>
  </blockquote>
  
  <p>Let me know if there is any alternative of <code>window.open()</code> in Angular 4.</p>