Angular 8: can not show new uploaded image without rebuilding the project

僤鯓⒐⒋嵵緔 提交于 2020-04-30 04:44:13

问题


When adding an image by nodejs in Angular project's assets folder Angular needs a rebuild to show the image by path, how can I get images without a rebuild?


回答1:


I suppose that you are talking about ng serve and not actual deployment.

The assets are meant to be static updated at build time (ng build or ng serve).

I would upload the images to a different directory outside of angular and fetch them from there in your angular app as is described at this link here



来源:https://stackoverflow.com/questions/58777612/angular-8-can-not-show-new-uploaded-image-without-rebuilding-the-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!