0
我已经试过类似的东西如何使用Angular材质添加图像?
<img ng-src="~/Images/profile.svg" style="height:130px ; width:180px" class="md-card-image" alt="~/Frontend/images/question-circular-button.svg">
http://localhost/WebApp/~/Images/profile.svg无法加载资源:服务器与404状态(未找到)`
的图像是该文件夹中的反应。可有人请帮我?
不要在你的url中使用〜,你为什么在这里使用ng-src? – Noppey
@Noppey使用什么?我看到了一个这样的例子 –
如果它位于/ webapp中的images目录中,只需使用“/images/profile.svg”即可。 〜是解决url的根源的剃刀/ asp.net thingy。 – Noppey