Angular 8:在不重建项目的情况下无法显示新上传的图像 [英] Angular 8: can not show new uploaded image without rebuilding the project

查看:157
本文介绍了Angular 8:在不重建项目的情况下无法显示新上传的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Angular项目的资产文件夹中通过nodejs添加图像时,Angular需要重建以按路径显示图像,如何在不重建的情况下获取图像?

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?

推荐答案

我想您是在谈论ng服务,而不是实际部署.

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

资产应在构建时进行静态更新(ng build或ng serve).

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

我会按照 查看全文

相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆