title: how can i host a file in Angular with routing?
body: <p>lets say i have a pdf file that i want to host on my angular site (v7). I have it in my wwwroot folder and when trying to route to that folder &amp; file via angular routing, i get an error that the route does not exist</p>
  <p>for example
  file is located in <code>wwwroot/sub/file.pdf</code>
  my route has the path, lets say <code>/files/file.pdf</code>. this would be the endpoint on my site <code>www.example.com/files/file.pdf</code></p>
  <pre><code>const routes: Routes = [
    { 
      path: 'files/file.pdf', //this is when a user types www.example.com/files/file.pdf
      redirectTo: '/sub/file.pdf' //this is where the file is stored in wwwroot
    }
  ];
  </code></pre>
  <p>i have tested my path and redirected to a component, works fine.</p>
  <p>that component is in the app folder tho, which is totally separate than the wwwroot folder. I don't care where the file is located, i'll move it to the app folder if needed, but i've tried that and can't seem to get it to work either.</p>
  <p>Since the wwwroot and app folder are 2 separate folders, i don't know how to get to app from wwwroot. my first thoughts are from wwwroot aka <code>www.example.com</code> to go up a level <code>../</code> and then into <code>app/src/...</code> of course this didn't work either and i dont think you can go above the wwwroot folder in the structure this way.</p>
  <p>how can i serve this file from my wwwroot folder (or anywhere else) on my angular site?</p>
  <p>thanks</p>