Using the Angular template built into VS 2017. I have an image in the assets/image folder, so ClientApp > src > assets > images.
I reference the image in my component like:
<img src="../../../assets/images/Logo.png" />
When deployed local, it works but after deploying to IIS it results in 404 error.
On the server, the app is deployed to a subfolder: inetsrv8/internal/MyApp
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'. The problem is I can't figure out how to grab the BASE Href to put it in a variable.
Is there a better way? A proper way? If not, how would I get the base href?
<img src="./assets/images/Logo.png" />