I am forever plagued by trying to reference an image from across my application. The directory structure is:
src/app/assets/images/splashImage.png
In this trivial case, I'm trying to reference it from:
src/app/app.component.html
The first line of the html:
<div class="splashContainer">
The css file:
.splashContainer {
background: url("../../assets/images/splashImage.png") no-repeat center center fixed;
The build diagnostic says it can't find the file at --> the URL path from above.
My rule that obviously is wrong is to count up starting at the folder housing the html. app is 1 and src is 2, which gets me above the assets folder. Thus the two ../ parts.
What am I doing wrong?
Thanks in advance. Yogi