【发布时间】:2016-11-04 18:58:46
【问题描述】:
我尝试过类似的方法
<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 用什么??我看到了一个这样的例子
-
如果它在 /webapp 的图像目录中,只需使用“/images/profile.svg”。 ~ 是一个 razor / asp.net 解决 url 根的东西。
标签: c# angularjs asp.net-mvc svg frontend