simple code is written.
<header>
<div>
<img src="../../images/bonjour_logo.png" alt="">
</div>
</header>
I’m just trying to get this image into my header and I’m getting this error: Failed to load resource: the server responded with a status of 404 (Not Found)
I’m pretty sure my path is correct, but maybe I’m wrong.
2
Answers
In order to load assets like images, fonts, etc.
Use angular’s pre-generated assets folder, it can be found under src/assets
You can move your image to
src/assets/images/img.png
and then use the image tag as given below.It should work fine.
You can put images folder into the folder when your html located and make src attribute like this
src="images/bonjour_logo.png"
if that doesn’t work your image corrupted or server is lagging