Search code examples
node.jsangularfile-uploadimage-uploadingrebuild

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


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?


Solution

  • 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