I have a collection of images that need to be shared throughout my application. There are 2 lazy-loaded modules - Login and Overview. The image I require is located in src/assets/images/logo.png and needs to be accessible in both the Login and Overview components.
The current project structure looks like this: (prefixed numbers represent levels for reference)
-0_ProjectName
-1_src
-2_assets
-3_images
-4_logo.png
-2_modules
-3_login
-4_containers
-5_login.component.scss
-5_login.component.ts
-5_login.component.html
-3_overview
-4_containers
-5_overview.component.scss
-5_overview.component.ts
-5_overview.component.html
How can I reference src/assets/images/logo.png within the respective scss files of the Login and Overview modules? When attempting to specify the image path as "../../../assets/images/logo.png" (going up 3 directories) in the scss files (login.component.scss and overview.component.scss), an error message stating that the image cannot be found is displayed.
Error log: ./src/modules/login/containers/login.component.scss Module not found: Error: Can't resolve '../../../assets/images/logo.png' in 'C:\Users\deepak\A2Workspace\ProjectName\src\modules\login\containers'