How can I create a component that uses an resource that is in the same folder? For instance, I want the background-image to be stored in component folder and then be able to use that component in a different module.
Thanks.
How can I create a component that uses an resource that is in the same folder? For instance, I want the background-image to be stored in component folder and then be able to use that component in a different module.
Thanks.
Any Resource
like image\font comes from path relative to your application URL, if you are configuring your server so that the component folder can be accessed and resources may be served from there, you may very well keep images in the component folder and use it, you just have to give the correct path traversing your project folders to your image.
Having said that is not a good practice, it may cause problems if you move your components, also its usually not a good idea to expose all the folders to the outside world. What you may do is have a assets folder where you can keep images and make them available for use.
Hope this helps!!