【问题标题】:What is the work of {{ }} in this html statement: <img alt="" src="~/content/Images/{{Imagename}}" />这个 html 语句中 {{ }} 的工作是什么:<img alt="" src="~/content/Images/{{Imagename}}" />
【发布时间】:2015-11-14 04:06:22
【问题描述】:

在处理 MVC.Net 网络项目时,我在互联网上的 html 语句下方找到。

<div>
<div class="animate-show" ng-show="showAnim">
<img alt="" src="~/content/Images/{{Imagename}}" />
</div>
</div>

我在我的源代码中实现它来显示图像。但不是显示图像,它只是显示 {{Imagename}} 作为输出。错误是什么?

【问题讨论】:

标签: jquery html asp.net-mvc-4


【解决方案1】:

angularjs 使用的{{ImageName}}。

<img alt="" src="~/content/Images/{{Imagename}}" />

您可以显示如下图。

<img src='~/content/Images/@Model.ImagePropertyName' />

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-03-28
    • 2017-08-08
    • 1970-01-01
    • 1970-01-01
    • 2015-03-29
    • 2014-02-18
    • 1970-01-01
    • 2013-06-03
    相关资源
    最近更新 更多