角度应用的图片未显示在浏览器中

时间:2019-02-03 04:06:32

标签: angular image browser localhost

我目前正在研究示例角度应用程序。 我想在浏览器中显示带有图像的产品列表。

enter image description here

这是产品的定义方式(仅显示第一个元素):

enter image description here

这是它在浏览器中的显示方式:

enter image description here

我使用的是Chrome,但对于IE或Edge也是如此。 当我直接浏览到URL时,我可以看到图像。 在应用程序(http://localhost:4200)中使用它们时,我看不到它们。

To look for the code on GitHub

我正在使用带有71.0.3578.98版本的Chrome的Win10 64位操作系统。

1 个答案:

答案 0 :(得分:2)

您的HTML中有一个错字。您应该引用product.imageURL时引用的是product.imageUrl