Is there a way to use angular base href as variable in image path? : <p>Using the Angular template built in to VS 2017.
I have an image in the assets/image folder, so ClientApp > src > assets > images.</p>

<p>I reference the image in my component like:</p>

<pre><code>    &lt;img src="../../../assets/images/Logo.png" /&gt;
</code></pre>

<p>When deployed local, it works but after deploying to IIS it results in 404 error.</p>

<p>On the server, the app is deployed to a subfolder:
    inetsrv8/internal/MyApp</p>

<p>I have to change the BASE HREF before deploying to get the app to work, so I'm thinking a fix would be to build custom paths for the images along the lines of BaseHref + './pathToImage'. Problem is I cant figure out how to grab the BASE Href to put it in a variable.</p>

<p>Is there a better way? A proper way? If not, how would I get the base href? </p>
