I have an image (i.e. a logo) that will be used in various components.
My folder structure looks similar to this:
src/
app/
component1/
component1.component.ts
...
component2/
sub-component1/
sub-component1.component.ts
...
component2.component.ts
...
assets/
img/
logo.jpg
icons/
styles.scss
Is there an easy way to store the path to the assets/img folder in a SCSS/SASS variable to be able to access the logo.jpg file without putting differing relative paths in the various components?
The reason I ask is I would like to swap out an image based on a theme, which I've implemented from this post here. When my project gets compiled, the variables inserted into the background-image: url(...) attribute have a specified path which doesn't work correctly for all components.
I can imagine this would help other scenarios immensely too though.